Skip to main content

AvroBinaryFormat

Struct AvroBinaryFormat 

Source
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

Source§

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>

Write any bytes required at the very beginning of the output stream (file header, etc.). Implementations must not write any record data.
Source§

fn sync_marker(&self) -> Option<&[u8; 16]>

Return the 16‑byte sync marker (OCF) or None (binary stream).
Source§

impl Debug for AvroBinaryFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AvroBinaryFormat

Source§

fn default() -> AvroBinaryFormat

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,