pub trait BKeys:
Default
+ Debug
+ Display
+ Sized {
Show 16 methods
// Required methods
fn with_key_val(key: Key, payload: Payload) -> Result<Self, Error>;
fn len(&self) -> u32;
fn is_empty(&self) -> bool;
fn get(&self, key: &Key) -> Option<Payload>;
fn collect_with_prefix(
&self,
prefix_key: &Key,
) -> Result<VecDeque<(Key, Payload)>, Error>;
fn insert(&mut self, key: Key, payload: Payload) -> Option<Payload>;
fn append(&mut self, keys: Self);
fn remove(&mut self, key: &Key) -> Option<Payload>;
fn split_keys(self) -> Result<SplitKeys<Self>, Error>;
fn get_key(&self, idx: usize) -> Option<Key>;
fn get_child_idx(&self, searched_key: &Key) -> usize;
fn get_first_key(&self) -> Option<(Key, Payload)>;
fn get_last_key(&self) -> Option<(Key, Payload)>;
fn read_from(c: &mut Cursor<Vec<u8>>) -> Result<Self, Error>;
fn write_to(&self, c: &mut Cursor<Vec<u8>>) -> Result<(), Error>;
// Provided method
fn compile(&mut self) { ... }
}
Required Methods§
fn with_key_val(key: Key, payload: Payload) -> Result<Self, Error>
fn len(&self) -> u32
fn is_empty(&self) -> bool
fn get(&self, key: &Key) -> Option<Payload>
fn collect_with_prefix( &self, prefix_key: &Key, ) -> Result<VecDeque<(Key, Payload)>, Error>
fn insert(&mut self, key: Key, payload: Payload) -> Option<Payload>
fn append(&mut self, keys: Self)
fn remove(&mut self, key: &Key) -> Option<Payload>
fn split_keys(self) -> Result<SplitKeys<Self>, Error>
fn get_key(&self, idx: usize) -> Option<Key>
fn get_child_idx(&self, searched_key: &Key) -> usize
fn get_first_key(&self) -> Option<(Key, Payload)>
fn get_last_key(&self) -> Option<(Key, Payload)>
fn read_from(c: &mut Cursor<Vec<u8>>) -> Result<Self, Error>
fn write_to(&self, c: &mut Cursor<Vec<u8>>) -> Result<(), Error>
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.