Struct grovedb_merk::tree::PanicSource
source · pub struct PanicSource {}Expand description
A source of data which panics when called. Useful when creating a store which always keeps the state in memory.
Trait Implementations§
source§impl Clone for PanicSource
impl Clone for PanicSource
source§fn clone(&self) -> PanicSource
fn clone(&self) -> PanicSource
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Fetch for PanicSource
impl Fetch for PanicSource
source§fn fetch(
&self,
_link: &Link,
_value_defined_cost_fn: Option<&impl Fn(&[u8], &GroveVersion) -> Option<ValueDefinedCostType>>,
_grove_version: &GroveVersion,
) -> CostResult<TreeNode, Error>
fn fetch( &self, _link: &Link, _value_defined_cost_fn: Option<&impl Fn(&[u8], &GroveVersion) -> Option<ValueDefinedCostType>>, _grove_version: &GroveVersion, ) -> CostResult<TreeNode, Error>
Called when the tree needs to fetch a node with the given
Link. The
link value will always be a Link::Reference variant.Auto Trait Implementations§
impl Freeze for PanicSource
impl RefUnwindSafe for PanicSource
impl Send for PanicSource
impl Sync for PanicSource
impl Unpin for PanicSource
impl UnwindSafe for PanicSource
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CostsExt for T
impl<T> CostsExt for T
source§fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
Self: Sized,
fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
Self: Sized,
Wraps any value into a
CostContext object with provided costs.source§fn wrap_fn_cost(
self,
f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
Self: Sized,
fn wrap_fn_cost(
self,
f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
Self: Sized,
Wraps any value into
CostContext object with costs computed using the
value getting wrapped.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T, U> TryFromVersioned<U> for Twhere
T: TryFrom<U>,
impl<T, U> TryFromVersioned<U> for Twhere
T: TryFrom<U>,
source§fn try_from_versioned(
value: U,
_grove_version: &GroveVersion,
) -> Result<T, <T as TryFromVersioned<U>>::Error>
fn try_from_versioned( value: U, _grove_version: &GroveVersion, ) -> Result<T, <T as TryFromVersioned<U>>::Error>
Performs the conversion.
source§impl<T, U> TryIntoVersioned<U> for Twhere
U: TryFromVersioned<T>,
impl<T, U> TryIntoVersioned<U> for Twhere
U: TryFromVersioned<T>,
§type Error = <U as TryFromVersioned<T>>::Error
type Error = <U as TryFromVersioned<T>>::Error
The type returned in the event of a conversion error.
source§fn try_into_versioned(
self,
grove_version: &GroveVersion,
) -> Result<U, <U as TryFromVersioned<T>>::Error>
fn try_into_versioned( self, grove_version: &GroveVersion, ) -> Result<U, <U as TryFromVersioned<T>>::Error>
Performs the conversion.