Skip to main content

Decoder

Trait Decoder 

Source
pub trait Decoder: Send + Sync {
    // Required method
    fn decode(
        &self,
        data: &[u8],
        metadata: ArcEventMetadata,
    ) -> Result<EventBatch>;
}
Expand description

A trait for components that convert a byte stream into an EventBatch.

Required Methods§

Source

fn decode(&self, data: &[u8], metadata: ArcEventMetadata) -> Result<EventBatch>

Decodes bytes into an EventBatch. The caller must provide the starting metadata for the batch (e.g., source ID, ingestion time).

Implementors§