Enum pancake_engine_common::entry::Entry
source · pub enum Entry<'a, K, V> {
Ref((&'a K, &'a V)),
Own(Result<(K, V)>),
}Expand description
Entry is the API for the content of the DB.
It is an enum that contains either a reference to an in-memory entry or an owned (non-shrared) entry that was read from disk.
Entry has some resemblance to std::borrow::Cow.
Variants§
Implementations§
source§impl<'a, K, V> Entry<'a, K, V>
impl<'a, K, V> Entry<'a, K, V>
pub fn try_borrow<'b>(&'b self) -> Result<(&'b K, &'b V)>
Trait Implementations§
source§impl<K, V, Rhs> TryPartialOrd<Rhs, Error> for Entry<'_, K, V>where
K: PartialOrd<Rhs>,
impl<K, V, Rhs> TryPartialOrd<Rhs, Error> for Entry<'_, K, V>where
K: PartialOrd<Rhs>,
Auto Trait Implementations§
impl<'a, K, V> RefUnwindSafe for Entry<'a, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K, V> Send for Entry<'a, K, V>
impl<'a, K, V> Sync for Entry<'a, K, V>
impl<'a, K, V> Unpin for Entry<'a, K, V>
impl<'a, K, V> UnwindSafe for Entry<'a, K, V>
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