pub trait AvroFormat: Debug + Default {
const NEEDS_PREFIX: bool;
// Required methods
fn start_stream<W: Write>(
&mut self,
writer: &mut W,
schema: &Schema,
compression: Option<CompressionCodec>,
) -> Result<(), ArrowError>;
fn sync_marker(&self) -> Option<&[u8; 16]>;
}
Expand description
Format abstraction implemented by each container‐level writer.
Required Associated Constants§
Sourceconst NEEDS_PREFIX: bool
const NEEDS_PREFIX: bool
If true
, the writer for this format will query single_object_prefix()
and write the prefix before each record. If false
, the writer can
skip this step. This is a performance hint for the writer.
Required Methods§
Sourcefn start_stream<W: Write>(
&mut self,
writer: &mut W,
schema: &Schema,
compression: Option<CompressionCodec>,
) -> Result<(), ArrowError>
fn start_stream<W: Write>( &mut self, writer: &mut W, schema: &Schema, compression: Option<CompressionCodec>, ) -> Result<(), ArrowError>
Write any bytes required at the very beginning of the output stream (file header, etc.). Implementations must not write any record data.
Sourcefn sync_marker(&self) -> Option<&[u8; 16]>
fn sync_marker(&self) -> Option<&[u8; 16]>
Return the 16‑byte sync marker (OCF) or None
(binary stream).
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.