Struct miden_client::notes::NoteInclusionProof
source · pub struct NoteInclusionProof { /* private fields */ }Expand description
Contains the data required to prove inclusion of a note in the canonical chain.
Implementations§
source§impl NoteInclusionProof
impl NoteInclusionProof
sourcepub fn new(
block_num: u32,
sub_hash: RpoDigest,
note_root: RpoDigest,
index: u64,
note_path: MerklePath,
) -> Result<NoteInclusionProof, NoteError>
pub fn new( block_num: u32, sub_hash: RpoDigest, note_root: RpoDigest, index: u64, note_path: MerklePath, ) -> Result<NoteInclusionProof, NoteError>
Returns a new NoteInclusionProof.
sourcepub fn sub_hash(&self) -> RpoDigest
pub fn sub_hash(&self) -> RpoDigest
Returns the sub hash of the block header the note was created in.
sourcepub fn note_root(&self) -> RpoDigest
pub fn note_root(&self) -> RpoDigest
Returns the note root of the block header the note was created in.
sourcepub fn origin(&self) -> &NoteOrigin
pub fn origin(&self) -> &NoteOrigin
Returns the origin of the note.
sourcepub fn note_path(&self) -> &MerklePath
pub fn note_path(&self) -> &MerklePath
Returns the Merkle path to the note in the note Merkle tree of the block the note was created in.
Trait Implementations§
source§impl Clone for NoteInclusionProof
impl Clone for NoteInclusionProof
source§fn clone(&self) -> NoteInclusionProof
fn clone(&self) -> NoteInclusionProof
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 NoteInclusionProof
impl Debug for NoteInclusionProof
source§impl Deserializable for NoteInclusionProof
impl Deserializable for NoteInclusionProof
source§fn read_from<R>(
source: &mut R,
) -> Result<NoteInclusionProof, DeserializationError>where
R: ByteReader,
fn read_from<R>(
source: &mut R,
) -> Result<NoteInclusionProof, DeserializationError>where
R: ByteReader,
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<'de> Deserialize<'de> for NoteInclusionProof
impl<'de> Deserialize<'de> for NoteInclusionProof
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NoteInclusionProof, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NoteInclusionProof, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for NoteInclusionProof
impl PartialEq for NoteInclusionProof
source§fn eq(&self, other: &NoteInclusionProof) -> bool
fn eq(&self, other: &NoteInclusionProof) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serializable for NoteInclusionProof
impl Serializable for NoteInclusionProof
source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
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 Serialize for NoteInclusionProof
impl Serialize for NoteInclusionProof
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for NoteInclusionProof
impl StructuralPartialEq for NoteInclusionProof
Auto Trait Implementations§
impl Freeze for NoteInclusionProof
impl RefUnwindSafe for NoteInclusionProof
impl Send for NoteInclusionProof
impl Sync for NoteInclusionProof
impl Unpin for NoteInclusionProof
impl UnwindSafe for NoteInclusionProof
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)