[−][src]Struct ipld_collections::map::Hamt
Implementations
impl<S: Store, T: Clone + DagCbor + Send + Sync> Hamt<S, T> where
S: Store,
S::Params: StoreParams<Hashes = Code>,
<S::Params as StoreParams>::Codecs: Into<DagCborCodec>,
DagCborCodec: Into<<S::Params as StoreParams>::Codecs>,
T: Decode<DagCborCodec> + Encode<DagCborCodec> + Clone + Send + Sync,
Ipld: Decode<<S::Params as StoreParams>::Codecs>,
[src]
S: Store,
S::Params: StoreParams<Hashes = Code>,
<S::Params as StoreParams>::Codecs: Into<DagCborCodec>,
DagCborCodec: Into<<S::Params as StoreParams>::Codecs>,
T: Decode<DagCborCodec> + Encode<DagCborCodec> + Clone + Send + Sync,
Ipld: Decode<<S::Params as StoreParams>::Codecs>,
pub async fn from<I: Into<Box<[u8]>>>(
store: S,
cache_size: usize,
btree: BTreeMap<I, T>
) -> Result<Self>
[src]
store: S,
cache_size: usize,
btree: BTreeMap<I, T>
) -> Result<Self>
pub async fn new(store: S, cache_size: usize) -> Result<Self>
[src]
pub async fn open(store: S, cache_size: usize, root: Cid) -> Result<Self>
[src]
pub async fn get<'_, '_>(&'_ mut self, key: &'_ [u8]) -> Result<Option<T>>
[src]
pub fn root(&self) -> &Cid
[src]
pub async fn insert<'_>(&'_ mut self, key: Box<[u8]>, value: T) -> Result<()>
[src]
pub async fn remove<'_, '_>(&'_ mut self, key: &'_ [u8]) -> Result<()>
[src]
Auto Trait Implementations
impl<S, T> !RefUnwindSafe for Hamt<S, T>
impl<S, T> Send for Hamt<S, T> where
T: Send,
<<S as Store>::Params as StoreParams>::Hashes: Send,
T: Send,
<<S as Store>::Params as StoreParams>::Hashes: Send,
impl<S, T> Sync for Hamt<S, T> where
T: Send,
<<S as Store>::Params as StoreParams>::Hashes: Sync,
T: Send,
<<S as Store>::Params as StoreParams>::Hashes: Sync,
impl<S, T> Unpin for Hamt<S, T> where
S: Unpin,
T: Unpin,
<<S as Store>::Params as StoreParams>::Hashes: Unpin,
S: Unpin,
T: Unpin,
<<S as Store>::Params as StoreParams>::Hashes: Unpin,
impl<S, T> UnwindSafe for Hamt<S, T> where
S: UnwindSafe,
T: UnwindSafe,
<<S as Store>::Params as StoreParams>::Hashes: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
<<S as Store>::Params as StoreParams>::Hashes: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,