Enum grovedb_merk::tree::TreeFeatureType
source · pub enum TreeFeatureType {
BasicMerkNode,
SummedMerkNode(i64),
}Expand description
Basic or summed
Variants§
Implementations§
source§impl TreeFeatureType
impl TreeFeatureType
sourcepub fn sum_length(&self) -> Option<u32>
pub fn sum_length(&self) -> Option<u32>
Get length of encoded SummedMerk
sourcepub fn is_sum_feature(&self) -> bool
pub fn is_sum_feature(&self) -> bool
Is sum feature?
Trait Implementations§
source§impl Clone for TreeFeatureType
impl Clone for TreeFeatureType
source§fn clone(&self) -> TreeFeatureType
fn clone(&self) -> TreeFeatureType
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 Debug for TreeFeatureType
impl Debug for TreeFeatureType
source§impl Decode for TreeFeatureType
impl Decode for TreeFeatureType
source§impl Encode for TreeFeatureType
impl Encode for TreeFeatureType
source§fn encode_into<W: Write>(&self, dest: &mut W) -> Result<()>
fn encode_into<W: Write>(&self, dest: &mut W) -> Result<()>
Writes the encoded representation of the value to the destination
writer. Can error due to either a write error from
dest, or an
encoding error for types where invalid values are possible. Read moresource§fn encoding_length(&self) -> Result<usize>
fn encoding_length(&self) -> Result<usize>
Calculates the length of the encoding for this value. Can error for
types where invalid values are possible.
source§impl PartialEq for TreeFeatureType
impl PartialEq for TreeFeatureType
impl Copy for TreeFeatureType
impl Eq for TreeFeatureType
impl StructuralPartialEq for TreeFeatureType
impl Terminated for TreeFeatureType
Auto Trait Implementations§
impl Freeze for TreeFeatureType
impl RefUnwindSafe for TreeFeatureType
impl Send for TreeFeatureType
impl Sync for TreeFeatureType
impl Unpin for TreeFeatureType
impl UnwindSafe for TreeFeatureType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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.