Struct fil_actors_runtime_v10::util::Set
source · pub struct Set<'a, BS>(_);
Expand description
Set is a HAMT with empty values for the purpose of acting as a hash set.
Implementations§
source§impl<'a, BS> Set<'a, BS>where
BS: Blockstore,
impl<'a, BS> Set<'a, BS>where BS: Blockstore,
sourcepub fn new_set_with_bitwidth(bs: &'a BS, bitwidth: u32) -> Self
pub fn new_set_with_bitwidth(bs: &'a BS, bitwidth: u32) -> Self
Initializes a new empty Set given a bit-width.
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 Set from a root Cid.
sourcepub fn for_each<F>(&self, f: F) -> Result<(), Error>where
F: FnMut(&BytesKey) -> Result<()>,
pub fn for_each<F>(&self, f: F) -> Result<(), Error>where F: FnMut(&BytesKey) -> Result<()>,
Iterates through all keys in the set.
sourcepub fn collect_keys(&self) -> Result<Vec<BytesKey>, Error>
pub fn collect_keys(&self) -> Result<Vec<BytesKey>, Error>
Collects all keys from the set into a vector.
Trait Implementations§
Auto Trait Implementations§
impl<'a, BS> RefUnwindSafe for Set<'a, BS>where BS: RefUnwindSafe,
impl<'a, BS> Send for Set<'a, BS>where BS: Sync,
impl<'a, BS> !Sync for Set<'a, BS>
impl<'a, BS> Unpin for Set<'a, BS>
impl<'a, BS> UnwindSafe for Set<'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