1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
//! Parser of [VTK legacy format](https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf)
pub mod dataset;
pub mod header;
pub mod primitive;
use header::*;
use primitive::*;
use nom::error::VerboseError;
pub type Result<'input, T> = nom::IResult<&'input str, T, VerboseError<&'input str>>;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Vtk {
pub header: Header,
}
pub fn vtk(input: &str) -> Result<Vtk> {
let (input, header) = header(input)?;
Ok((input, Vtk { header }))
}