Struct fil_actors_runtime_v10::util::SetMultimap
source · pub struct SetMultimap<'a, BS>(pub Map<'a, BS, Cid>);
Expand description
SetMultimap
is a HAMT with values that are also a HAMT but are of the set variant.
This allows hash sets to be indexable by an address.
Tuple Fields§
§0: Map<'a, BS, Cid>
Implementations§
source§impl<'a, BS> SetMultimap<'a, BS>where
BS: Blockstore,
impl<'a, BS> SetMultimap<'a, BS>where BS: Blockstore,
sourcepub fn from_root(bs: &'a BS, cid: &Cid) -> Result<Self, Error>
pub fn from_root(bs: &'a BS, cid: &Cid) -> Result<Self, Error>
Initializes a SetMultimap
from a root Cid.
sourcepub fn put(&mut self, key: ChainEpoch, value: DealID) -> Result<(), Error>
pub fn put(&mut self, key: ChainEpoch, value: DealID) -> Result<(), Error>
Puts the DealID
in the hash set of the key.
sourcepub fn put_many(
&mut self,
key: ChainEpoch,
values: &[DealID]
) -> Result<(), Error>
pub fn put_many( &mut self, key: ChainEpoch, values: &[DealID] ) -> Result<(), Error>
Puts slice of DealID
s in the hash set of the key.
sourcepub fn get(&self, key: ChainEpoch) -> Result<Option<Set<'a, BS>>, Error>
pub fn get(&self, key: ChainEpoch) -> Result<Option<Set<'a, BS>>, Error>
Gets the set at the given index of the SetMultimap
sourcepub fn remove(&mut self, key: ChainEpoch, v: DealID) -> Result<(), Error>
pub fn remove(&mut self, key: ChainEpoch, v: DealID) -> Result<(), Error>
Removes a DealID
from a key hash set.
sourcepub fn remove_all(&mut self, key: ChainEpoch) -> Result<(), Error>
pub fn remove_all(&mut self, key: ChainEpoch) -> Result<(), Error>
Removes set at index.
Auto Trait Implementations§
impl<'a, BS> RefUnwindSafe for SetMultimap<'a, BS>where BS: RefUnwindSafe,
impl<'a, BS> Send for SetMultimap<'a, BS>where BS: Sync,
impl<'a, BS> !Sync for SetMultimap<'a, BS>
impl<'a, BS> Unpin for SetMultimap<'a, BS>
impl<'a, BS> UnwindSafe for SetMultimap<'a, BS>where BS: RefUnwindSafe,
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