Trait PcdSerialize

Source
pub trait PcdSerialize: Sized {
    // Required methods
    fn is_dynamic() -> bool;
    fn write_spec() -> Schema;
    fn write_chunk<R: Write + Seek>(
        &self,
        writer: &mut R,
        spec: &Schema,
    ) -> Result<()>;
    fn write_line<R: Write + Seek>(
        &self,
        writer: &mut R,
        spec: &Schema,
    ) -> Result<()>;
}
Expand description

PcdSerialize is analogous to a point written by a writer.

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

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§

Source

fn is_dynamic() -> bool

Source

fn write_spec() -> Schema

Source

fn write_chunk<R: Write + Seek>( &self, writer: &mut R, spec: &Schema, ) -> Result<()>

Source

fn write_line<R: Write + Seek>( &self, writer: &mut R, spec: &Schema, ) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§