pub trait Key {
// Required methods
fn at(&self, pos: usize) -> u8;
fn len(&self) -> usize;
fn prefix_before(&self, length: usize) -> &[u8] ⓘ;
fn prefix_after(&self, start: usize) -> &[u8] ⓘ;
fn longest_common_prefix(&self, slice: &[u8]) -> usize;
fn as_slice(&self) -> &[u8] ⓘ;
fn extend(&self, other: &Self) -> Self;
// Provided method
fn is_empty(&self) -> bool { ... }
}
Required Methods§
fn at(&self, pos: usize) -> u8
fn len(&self) -> usize
fn prefix_before(&self, length: usize) -> &[u8] ⓘ
fn prefix_after(&self, start: usize) -> &[u8] ⓘ
fn longest_common_prefix(&self, slice: &[u8]) -> usize
fn as_slice(&self) -> &[u8] ⓘ
fn extend(&self, other: &Self) -> Self
Provided Methods§
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.