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§

source

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

Serializes an object to a sink.

source

fn get_buffer_format(&self) -> BufferFormat

Gets the buffer format currently being serialized.

Provided Methods§

source

fn is_text_format(&self) -> bool

This can be set to get correct CRLF on Windows.

Implementors§

source§

impl AbstractSerializer for icu_provider_fs::export::serializers::bincode::Serializer

source§

impl AbstractSerializer for icu_provider_fs::export::serializers::json::Serializer

source§

impl AbstractSerializer for icu_provider_fs::export::serializers::postcard::Serializer