Trait icu_provider_fs::export::serializers::AbstractSerializer
source · 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§
sourcefn serialize(
&self,
obj: &DataPayload<ExportMarker>,
sink: &mut dyn Write
) -> Result<(), DataError>
fn serialize( &self, obj: &DataPayload<ExportMarker>, sink: &mut dyn Write ) -> Result<(), DataError>
Serializes an object to a sink.
sourcefn get_buffer_format(&self) -> BufferFormat
fn get_buffer_format(&self) -> BufferFormat
Gets the buffer format currently being serialized.
Provided Methods§
sourcefn is_text_format(&self) -> bool
fn is_text_format(&self) -> bool
This can be set to get correct CRLF on Windows.