pub struct Naive { /* private fields */ }Expand description
Petal is a dynamically-sized type (DST) that succinctly stores keys and values, accessible
lexicographically.
Implementations§
Source§impl Petal
impl Petal
pub fn new() -> Box<Petal>
pub fn len(&self) -> usize
pub fn contains(&self, key: &'_ [u8]) -> bool
pub fn get(&self, key: &'_ [u8]) -> Option<&'_ [u8]>
pub fn range<'a>(&'a self, start: Bound<&[u8]>, end: Bound<&[u8]>) -> Iter<'a>
pub fn batch<'a, I: IntoIterator<Item = (&'a [u8], Option<&'a [u8]>)>>( &self, iter: I, ) -> Box<Petal>
pub fn split(&self, split_key: &'_ [u8]) -> (Box<Petal>, Box<Petal>)
pub fn merge(&self, rhs: &Petal) -> Box<Petal>
Trait Implementations§
Source§impl Interface for Box<Naive>
impl Interface for Box<Naive>
type Iter<'a> = Iter<'a> where Self: 'a
fn range<'a>(&'a self, start: Bound<&[u8]>, end: Bound<&[u8]>) -> Self::Iter<'a>
fn get(&self, key: &'_ [u8]) -> Option<&'_ [u8]>
fn batch<'a, I: IntoIterator<Item = (&'a [u8], Option<&'a [u8]>)>>( &self, iter: I, ) -> Self
fn contains(&self, key: &'_ [u8]) -> bool
fn split(&self, split_key: &'_ [u8]) -> (Self, Self)
fn len(&self) -> usize
fn merge(&self, rhs: &Self) -> Self
fn insert(&self, key: &'_ [u8], value: &'_ [u8]) -> (Option<&'_ [u8]>, Self)
fn remove(&self, key: &'_ [u8]) -> (Option<&'_ [u8]>, Self)
Auto Trait Implementations§
impl Freeze for Petal
impl RefUnwindSafe for Petal
impl Send for Petal
impl Sync for Petal
impl Unpin for Petal
impl UnsafeUnpin for Petal
impl UnwindSafe for Petal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more