pub trait AbstractSerializer: Debug {
    // Required methods
    fn serialize(
        &self,
        obj: &DataPayload<ExportMarker>,
        sink: &mut dyn Write,
    ) -> Result<(), DataError>;
    fn get_buffer_format(&self) -> BufferFormat;

    // Provided method
    fn is_text_format(&self) -> bool { ... }
}
Expand description

A simple serializer trait that works on whole objects.

This trait is not meant to be implemented by clients.

Required Methods§

fn serialize( &self, obj: &DataPayload<ExportMarker>, sink: &mut dyn Write, ) -> Result<(), DataError>

Serializes an object to a sink.

fn get_buffer_format(&self) -> BufferFormat

Gets the buffer format currently being serialized.

Provided Methods§

fn is_text_format(&self) -> bool

This can be set to get correct CRLF on Windows.

Implementors§

§

impl AbstractSerializer for icu_provider_export::fs_exporter::serializers::Bincode

§

impl AbstractSerializer for icu_provider_export::fs_exporter::serializers::Json

§

impl AbstractSerializer for icu_provider_export::fs_exporter::serializers::Postcard