Struct fuel_merkle::binary::MerkleTree
source · [−]pub struct MerkleTree<StorageType> { /* private fields */ }
Implementations
sourceimpl<StorageType, StorageError> MerkleTree<StorageType> where
StorageType: Storage<u64, Node, Error = StorageError>,
StorageError: Debug + Clone + 'static,
impl<StorageType, StorageError> MerkleTree<StorageType> where
StorageType: Storage<u64, Node, Error = StorageError>,
StorageError: Debug + Clone + 'static,
pub fn new(storage: StorageType) -> Self
pub fn load(
storage: StorageType,
leaves_count: u64
) -> Result<Self, MerkleTreeError<StorageError>>
pub fn root(&mut self) -> Result<Bytes32, MerkleTreeError<StorageError>>
pub fn prove(
&mut self,
proof_index: u64
) -> Result<(Bytes32, ProofSet), MerkleTreeError<StorageError>>
pub fn push(&mut self, data: &[u8]) -> Result<(), MerkleTreeError<StorageError>>
Auto Trait Implementations
impl<StorageType> RefUnwindSafe for MerkleTree<StorageType> where
StorageType: RefUnwindSafe,
impl<StorageType> Send for MerkleTree<StorageType> where
StorageType: Send,
impl<StorageType> Sync for MerkleTree<StorageType> where
StorageType: Sync,
impl<StorageType> Unpin for MerkleTree<StorageType> where
StorageType: Unpin,
impl<StorageType> UnwindSafe for MerkleTree<StorageType> where
StorageType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more