surrealdb::idx::trees::bkeys

Trait BKeys

Source
pub trait BKeys:
    Default
    + Display
    + Sized {
Show 17 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); 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>; fn debug<F>(&self, to_string: F) -> Result<(), Error> where F: Fn(Key) -> Result<String, Error>; // Provided method fn compile(&mut self) { ... }
}

Required Methods§

Source

fn with_key_val(key: Key, payload: Payload) -> Result<Self, Error>

Source

fn len(&self) -> u32

Source

fn is_empty(&self) -> bool

Source

fn get(&self, key: &Key) -> Option<Payload>

Source

fn collect_with_prefix( &self, prefix_key: &Key, ) -> Result<VecDeque<(Key, Payload)>, Error>

Source

fn insert(&mut self, key: Key, payload: Payload)

Source

fn append(&mut self, keys: Self)

Source

fn remove(&mut self, key: &Key) -> Option<Payload>

Source

fn split_keys(self) -> Result<SplitKeys<Self>, Error>

Source

fn get_key(&self, idx: usize) -> Option<Key>

Source

fn get_child_idx(&self, searched_key: &Key) -> usize

Source

fn get_first_key(&self) -> Option<(Key, Payload)>

Source

fn get_last_key(&self) -> Option<(Key, Payload)>

Source

fn read_from(c: &mut Cursor<Vec<u8>>) -> Result<Self, Error>

Source

fn write_to(&self, c: &mut Cursor<Vec<u8>>) -> Result<(), Error>

Source

fn debug<F>(&self, to_string: F) -> Result<(), Error>
where F: Fn(Key) -> Result<String, Error>,

Provided Methods§

Source

fn compile(&mut self)

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.

Implementors§