sophia_api::serializer

Trait QuadSerializer

Source
pub trait QuadSerializer {
    type Error: 'static + Error;

    // Required method
    fn serialize_quads<QS>(
        &mut self,
        source: QS,
    ) -> StreamResult<&mut Self, QS::Error, Self::Error>
       where QS: QuadSource,
             Self: Sized;

    // Provided method
    fn serialize_dataset<D>(
        &mut self,
        dataset: &D,
    ) -> StreamResult<&mut Self, D::Error, Self::Error>
       where D: Dataset,
             Self: Sized { ... }
}
Expand description

A quad serializer writes quads according to a given format.

Required Associated Types§

Source

type Error: 'static + Error

The error type that may be raised during serialization.

Required Methods§

Source

fn serialize_quads<QS>( &mut self, source: QS, ) -> StreamResult<&mut Self, QS::Error, Self::Error>
where QS: QuadSource, Self: Sized,

Serialize all quads from the given QuadSource.

Provided Methods§

Source

fn serialize_dataset<D>( &mut self, dataset: &D, ) -> StreamResult<&mut Self, D::Error, Self::Error>
where D: Dataset, Self: Sized,

Serialize a whole Dataset.

While this method has a default implementation based on serialize_quads, some implementations may override it in order to better use the structure of the Dataset.

Implementors§