pub struct ValuePath {
pub value: Word,
pub path: MerklePath,
}
Expand description
A container for a crate::Word value and its MerklePath opening.
Fields§
§value: Word
The node value opening for path
.
path: MerklePath
The path from value
to root
(exclusive).
Implementations§
Trait Implementations§
Source§impl Deserializable for ValuePath
impl Deserializable for ValuePath
Source§fn read_from<R: ByteReader>(
source: &mut R,
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R, ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
source
, attempts to deserialize these bytes
into Self
, and returns the result. Read moreSource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§impl From<(MerklePath, Word)> for ValuePath
impl From<(MerklePath, Word)> for ValuePath
Source§fn from((path, value): (MerklePath, Word)) -> Self
fn from((path, value): (MerklePath, Word)) -> Self
Converts to this type from the input type.
Source§impl From<SparseValuePath> for ValuePath
impl From<SparseValuePath> for ValuePath
Source§fn from(other: SparseValuePath) -> Self
fn from(other: SparseValuePath) -> Self
Converts to this type from the input type.
Source§impl PartialEq<SparseValuePath> for ValuePath
impl PartialEq<SparseValuePath> for ValuePath
Source§impl PartialEq<ValuePath> for SparseValuePath
impl PartialEq<ValuePath> for SparseValuePath
Source§impl Serializable for ValuePath
impl Serializable for ValuePath
Source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self
into bytes and writes these bytes into the target
.Source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
Source§impl TryFrom<ValuePath> for SparseValuePath
impl TryFrom<ValuePath> for SparseValuePath
Source§fn try_from(other: ValuePath) -> Result<Self, MerkleError>
fn try_from(other: ValuePath) -> Result<Self, MerkleError>
§Errors
This conversion returns MerkleError::DepthTooBig if the path length is greater than
SMT_MAX_DEPTH
.
Source§type Error = MerkleError
type Error = MerkleError
The type returned in the event of a conversion error.
impl Eq for ValuePath
impl StructuralPartialEq for ValuePath
Auto Trait Implementations§
impl Freeze for ValuePath
impl RefUnwindSafe for ValuePath
impl Send for ValuePath
impl Sync for ValuePath
impl Unpin for ValuePath
impl UnwindSafe for ValuePath
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§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 more