Struct fuel_merkle::sparse::MerkleTree
source · [−]pub struct MerkleTree<StorageType> { /* private fields */ }
Implementations
sourceimpl<StorageType, StorageError> MerkleTree<StorageType> where
StorageType: Storage<Bytes32, [u8; 69], Error = StorageError>,
StorageError: Debug + Clone + 'static,
impl<StorageType, StorageError> MerkleTree<StorageType> where
StorageType: Storage<Bytes32, [u8; 69], Error = StorageError>,
StorageError: Debug + Clone + 'static,
pub fn new(storage: StorageType) -> Self
pub fn load(
storage: StorageType,
root: &Bytes32
) -> Result<Self, MerkleTreeError<StorageError>>
pub fn update(
&mut self,
key: &Bytes32,
data: &[u8]
) -> Result<(), MerkleTreeError<StorageError>>
pub fn delete(
&mut self,
key: &Bytes32
) -> Result<(), MerkleTreeError<StorageError>>
pub fn root(&self) -> Bytes32
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