pub struct AvroBinaryFormat;Expand description
Unframed Avro binary streaming format (“raw Avro record body bytes (no prefix, no OCF header)”).
Each record written by the stream writer contains only the raw Avro record body bytes (i.e., the Avro binary encoding of the datum) with no per-record prefix and no Object Container File (OCF) header.
This format is useful when another transport provides framing (for example, length-delimited buffers) or when embedding Avro record payloads inside a larger envelope.
Trait Implementations§
Source§impl AvroFormat for AvroBinaryFormat
impl AvroFormat for AvroBinaryFormat
Source§const NEEDS_PREFIX: bool = false
const NEEDS_PREFIX: bool = false
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.Source§fn start_stream<W: Write>(
&mut self,
_writer: &mut W,
_schema: &Schema,
compression: Option<CompressionCodec>,
) -> Result<(), AvroError>
fn start_stream<W: Write>( &mut self, _writer: &mut W, _schema: &Schema, compression: Option<CompressionCodec>, ) -> Result<(), AvroError>
Write any bytes required at the very beginning of the output stream
(file header, etc.).
Implementations must not write any record data.
Source§impl Debug for AvroBinaryFormat
impl Debug for AvroBinaryFormat
Source§impl Default for AvroBinaryFormat
impl Default for AvroBinaryFormat
Source§fn default() -> AvroBinaryFormat
fn default() -> AvroBinaryFormat
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AvroBinaryFormat
impl RefUnwindSafe for AvroBinaryFormat
impl Send for AvroBinaryFormat
impl Sync for AvroBinaryFormat
impl Unpin for AvroBinaryFormat
impl UnwindSafe for AvroBinaryFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more