pub trait StructuralFieldDecoder: Debug + Send {
// Required methods
fn accept_page(&mut self, _child: LoadedPageShard) -> Result<()>;
fn drain(
&mut self,
num_rows: u64,
) -> Result<Box<dyn StructuralDecodeArrayTask>>;
fn data_type(&self) -> &DataType;
// Provided method
fn plan_decoded_bytes(&self, _rows_remaining: u64) -> Result<[u64; 8]> { ... }
}Required Methods§
Sourcefn accept_page(&mut self, _child: LoadedPageShard) -> Result<()>
fn accept_page(&mut self, _child: LoadedPageShard) -> Result<()>
Add a newly scheduled child decoder
The default implementation does not expect children and returns an error.
Provided Methods§
Sourcefn plan_decoded_bytes(&self, _rows_remaining: u64) -> Result<[u64; 8]>
fn plan_decoded_bytes(&self, _rows_remaining: u64) -> Result<[u64; 8]>
Returns the exact decoded byte count for each of CANDIDATE_BATCH_SIZES
row counts, clamped to rows_remaining.
Implementations should do their best to estimate the exact size required for the uncompressed data. In cases where this is not possible they should return a worst-case estimate.
The default implementation simply returns a “not supported” error though this will hopefully be removed once implementation is complete.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".