pub trait Schema: Eq + Debug {
type Error: Error + Send + Sync + 'static;
type Value: Default + Clone + Eq + Send + Sync + Debug + 'static;
// Required methods
fn block_size(&self) -> usize;
fn len(&self) -> usize;
fn order(&self) -> usize;
fn validate_key(
&self,
key: Vec<Self::Value>,
) -> Result<Vec<Self::Value>, Self::Error>;
}
Expand description
The schema of a B+Tree
Required Associated Types§
Required Methods§
Sourcefn block_size(&self) -> usize
fn block_size(&self) -> usize
Get the maximum size in bytes of a leaf node in a B+Tree with this Schema
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.