pub struct Tree(/* private fields */);
Implementations§
source§impl Tree
impl Tree
pub fn db(&self) -> Db
pub fn get<T: AsRef<[u8]>>(&self, key: T) -> Result<Option<Value>>
pub fn len(&self) -> Result<usize>
pub fn first(&self) -> Result<Option<(Value, Value)>>
pub fn get_gt<T: AsRef<[u8]>>(&self, from: T) -> Result<Option<(Value, Value)>>
sourcepub fn insert<T: AsRef<[u8]>, U: AsRef<[u8]>>(
&self,
key: T,
value: U
) -> Result<Option<Value>>
pub fn insert<T: AsRef<[u8]>, U: AsRef<[u8]>>( &self, key: T, value: U ) -> Result<Option<Value>>
Returns the old value if there was one
sourcepub fn remove<T: AsRef<[u8]>>(&self, key: T) -> Result<Option<Value>>
pub fn remove<T: AsRef<[u8]>>(&self, key: T) -> Result<Option<Value>>
Returns the old value if there was one
pub fn iter(&self) -> Result<ValueIter<'_>>
pub fn iter_rev(&self) -> Result<ValueIter<'_>>
pub fn range<K, R>(&self, range: R) -> Result<ValueIter<'_>>
pub fn range_rev<K, R>(&self, range: R) -> Result<ValueIter<'_>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tree
impl !RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl !UnwindSafe for Tree
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