pub struct AvroEncoder { /* private fields */ }Expand description
Avro Encoder
Implementations§
Source§impl AvroEncoder
impl AvroEncoder
pub fn new(options: AvroEncoderOptions) -> Self
Trait Implementations§
Source§impl Debug for AvroEncoder
impl Debug for AvroEncoder
Source§impl Default for AvroEncoder
impl Default for AvroEncoder
Source§fn default() -> AvroEncoder
fn default() -> AvroEncoder
Returns the “default value” for a type. Read more
Source§impl Encoder for AvroEncoder
impl Encoder for AvroEncoder
Source§fn encode(&self, batch: &EventBatch) -> EncodeResult<Bytes>
fn encode(&self, batch: &EventBatch) -> EncodeResult<Bytes>
Encodes a single
EventBatch into a single byte stream.
This is typically used for batch-oriented sinks like S3 or GCS.Source§fn encode_individual(&self, batch: &EventBatch) -> Result<Vec<Bytes>, Error>
fn encode_individual(&self, batch: &EventBatch) -> Result<Vec<Bytes>, Error>
Encodes an
EventBatch into multiple independent byte streams (one per event).
This is typically used for message-oriented sinks like Kafka.
Default implementation just returns a single Vec with the output of encode.Auto Trait Implementations§
impl Freeze for AvroEncoder
impl RefUnwindSafe for AvroEncoder
impl Send for AvroEncoder
impl Sync for AvroEncoder
impl Unpin for AvroEncoder
impl UnsafeUnpin for AvroEncoder
impl UnwindSafe for AvroEncoder
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