Struct miden_objects::batches::BatchNoteTree
source · pub struct BatchNoteTree(/* private fields */);Expand description
Wrapper over SimpleSmt<BATCH_OUTPUT_NOTES_TREE_DEPTH> for batch note tree.
Each note is stored as two adjacent leaves: odd leaf for id, even leaf for metadata hash.
Implementations§
source§impl BatchNoteTree
impl BatchNoteTree
sourcepub fn with_contiguous_leaves<'a>(
entries: impl IntoIterator<Item = (NoteId, &'a NoteMetadata)>,
) -> Result<Self, MerkleError>
pub fn with_contiguous_leaves<'a>( entries: impl IntoIterator<Item = (NoteId, &'a NoteMetadata)>, ) -> Result<Self, MerkleError>
Wrapper around SimpleSmt::with_contiguous_leaves which populates notes at contiguous indices
starting at index 0.
§Errors
Returns an error if the number of entries exceeds the maximum tree capacity, that is 2^{depth}.
Trait Implementations§
source§impl Clone for BatchNoteTree
impl Clone for BatchNoteTree
source§fn clone(&self) -> BatchNoteTree
fn clone(&self) -> BatchNoteTree
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 BatchNoteTree
impl Debug for BatchNoteTree
source§impl PartialEq for BatchNoteTree
impl PartialEq for BatchNoteTree
source§fn eq(&self, other: &BatchNoteTree) -> bool
fn eq(&self, other: &BatchNoteTree) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for BatchNoteTree
impl StructuralPartialEq for BatchNoteTree
Auto Trait Implementations§
impl Freeze for BatchNoteTree
impl RefUnwindSafe for BatchNoteTree
impl Send for BatchNoteTree
impl Sync for BatchNoteTree
impl Unpin for BatchNoteTree
impl UnwindSafe for BatchNoteTree
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)