[][src]Struct ipld_collections::map::Hamt

pub struct Hamt<S: Store, T: DagCbor> { /* fields omitted */ }

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]

pub async fn from<I: Into<Box<[u8]>>>(
    store: S,
    cache_size: usize,
    btree: BTreeMap<I, T>
) -> Result<Self>
[src]

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

impl<S, T> Sync for Hamt<S, T> where
    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

impl<S, T> UnwindSafe for Hamt<S, T> where
    S: UnwindSafe,
    T: UnwindSafe,
    <<S as Store>::Params as StoreParams>::Hashes: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.