pub trait ExpertSource: Send + Sync {
// Required methods
fn expert_len(&self, key: ExpertKey) -> Option<usize>;
fn read_expert(&self, key: ExpertKey) -> Result<Vec<u8>>;
}Expand description
Where expert bytes come from. Implementations must be cheap to call concurrently (positional reads, not a shared seek cursor).
Required Methods§
Sourcefn expert_len(&self, key: ExpertKey) -> Option<usize>
fn expert_len(&self, key: ExpertKey) -> Option<usize>
The exact byte length of this expert, or None if the key does
not exist. Used for budget accounting before reading.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".