pub trait RecordParser: Send + Sync {
// Required methods
fn validate(&self, bytes: &[u8]) -> Result<()>;
fn parse_chunk(
&self,
bytes: &[u8],
sink: &mut dyn ColumnarSink,
) -> Result<()>;
}Expand description
Format-specific parser: turns a byte chunk into field/value events sent to
a ColumnarSink.
Required Methods§
Sourcefn validate(&self, bytes: &[u8]) -> Result<()>
fn validate(&self, bytes: &[u8]) -> Result<()>
Validate that the whole byte slice is well-formed for this format.
Sourcefn parse_chunk(&self, bytes: &[u8], sink: &mut dyn ColumnarSink) -> Result<()>
fn parse_chunk(&self, bytes: &[u8], sink: &mut dyn ColumnarSink) -> Result<()>
Parse one chunk and feed all row events into sink.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".