pub struct JsonEncoder { /* private fields */ }Expand description
JSON Encoder
Implementations§
Source§impl JsonEncoder
impl JsonEncoder
pub fn new(options: JsonEncoderOptions) -> Self
Trait Implementations§
Source§impl Debug for JsonEncoder
impl Debug for JsonEncoder
Source§impl Default for JsonEncoder
impl Default for JsonEncoder
Source§fn default() -> JsonEncoder
fn default() -> JsonEncoder
Returns the “default value” for a type. Read more
Source§impl Encoder for JsonEncoder
impl Encoder for JsonEncoder
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) -> EncodeResult<Vec<Bytes>>
fn encode_individual(&self, batch: &EventBatch) -> EncodeResult<Vec<Bytes>>
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 JsonEncoder
impl RefUnwindSafe for JsonEncoder
impl Send for JsonEncoder
impl Sync for JsonEncoder
impl Unpin for JsonEncoder
impl UnsafeUnpin for JsonEncoder
impl UnwindSafe for JsonEncoder
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