pub struct Builder<H> { /* private fields */ }Expand description
A MerkleSearchTree builder to initialise trees with custom parameters.
Implementations§
Source§impl<H> Builder<H>
impl<H> Builder<H>
Sourcepub fn with_hasher<T>(self, hasher: T) -> Builder<T>
pub fn with_hasher<T>(self, hasher: T) -> Builder<T>
Use the provided Hasher to compute key and value digests.
Sourcepub fn with_level_base(self, b: NonZeroU8) -> Self
pub fn with_level_base(self, b: NonZeroU8) -> Self
Configure the value for the parameter B as described in the paper (the
branching factor).
Decreasing this value increases the hight of the tree, which increases the number of pages, and therefore decreases the average page size.
Source§impl<H> Builder<H>
impl<H> Builder<H>
Sourcepub fn build<K, V, const N: usize>(self) -> MerkleSearchTree<K, V, H, N>
pub fn build<K, V, const N: usize>(self) -> MerkleSearchTree<K, V, H, N>
Consume this Builder and return the configured MerkleSearchTree.
Trait Implementations§
Auto Trait Implementations§
impl<H> Freeze for Builder<H>where
H: Freeze,
impl<H> RefUnwindSafe for Builder<H>where
H: RefUnwindSafe,
impl<H> Send for Builder<H>where
H: Send,
impl<H> Sync for Builder<H>where
H: Sync,
impl<H> Unpin for Builder<H>where
H: Unpin,
impl<H> UnwindSafe for Builder<H>where
H: UnwindSafe,
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