[][src]Trait pcd_rs::record::PcdDeserialize

pub trait PcdDeserialize: Sized {
    fn is_dynamic() -> bool;
fn read_spec() -> Vec<(Option<String>, ValueKind, Option<usize>)>;
fn read_chunk<R: BufRead>(
        reader: &mut R,
        field_defs: &[FieldDef]
    ) -> Fallible<Self>;
fn read_line<R: BufRead>(
        reader: &mut R,
        field_defs: &[FieldDef]
    ) -> Fallible<Self>; }

PcdDeserialize is analogous to a point returned from a reader.

The trait is not intended to be implemented from scratch. You must derive the implementation with #[derive(PcdDeserialize)].

When the PCD data is in ASCII mode, the record is represented by a line of literals. Otherwise if the data is in binary mode, the record is represented by a fixed size chunk.

Required methods

fn is_dynamic() -> bool

fn read_spec() -> Vec<(Option<String>, ValueKind, Option<usize>)>

fn read_chunk<R: BufRead>(
    reader: &mut R,
    field_defs: &[FieldDef]
) -> Fallible<Self>

fn read_line<R: BufRead>(
    reader: &mut R,
    field_defs: &[FieldDef]
) -> Fallible<Self>

Loading content...

Implementations on Foreign Types

impl PcdDeserialize for u8[src]

impl PcdDeserialize for i8[src]

impl PcdDeserialize for u16[src]

impl PcdDeserialize for u32[src]

impl PcdDeserialize for i16[src]

impl PcdDeserialize for i32[src]

impl PcdDeserialize for f32[src]

impl PcdDeserialize for f64[src]

Loading content...

Implementors

impl PcdDeserialize for DynRecord[src]

Loading content...