Struct arret_runtime::boxed::Set [−][src]
Immutable set of boxed values
This is semantically similar to a map of values to the unit type
Implementations
impl<T: Boxed> Set<T>
[src]
impl<T: Boxed> Set<T>
[src]pub const MAX_INLINE_LEN: usize
[src]
Maximum element length of an inline set
pub const EXTERNAL_INLINE_LEN: u32
[src]
Inline element length used for external sets
pub fn new(
heap: &mut impl AsHeap,
values: impl ExactSizeIterator<Item = Gc<T>>
) -> Gc<Set<T>>
[src]
heap: &mut impl AsHeap,
values: impl ExactSizeIterator<Item = Gc<T>>
) -> Gc<Set<T>>
Constructs a new set with the passed boxed values
pub fn from_values<V, F>(
heap: &mut impl AsHeap,
values: impl Iterator<Item = V>,
cons: F
) -> Gc<Set<T>> where
F: Fn(&mut Heap, V) -> Gc<T>,
[src]
heap: &mut impl AsHeap,
values: impl Iterator<Item = V>,
cons: F
) -> Gc<Set<T>> where
F: Fn(&mut Heap, V) -> Gc<T>,
Constructs a set by constructing an iterator of values
pub fn len(&self) -> usize
[src]
Returns the length of the set
pub fn is_empty(&self) -> bool
[src]
Returns true if the set is empty
pub fn contains(&self, heap: &Heap, value: &Gc<T>) -> bool
[src]
Returns true if the passed value is included in the set
pub fn iter<'a>(&'a self) -> Box<dyn ExactSizeIterator<Item = Gc<T>> + 'a>
[src]
Returns an iterator over the set
pub fn is_subset(&self, heap: &Heap, other: &Set<T>) -> bool
[src]
Returns if this set is a subset of the passed set
Trait Implementations
impl<T: Boxed> EncodeBoxedAbiType for Set<T> where
T: EncodeBoxedAbiType,
[src]
impl<T: Boxed> EncodeBoxedAbiType for Set<T> where
T: EncodeBoxedAbiType,
[src]const BOXED_ABI_TYPE: BoxedAbiType
[src]
impl<T: Boxed> HashInHeap for Set<T>
[src]
impl<T: Boxed> HashInHeap for Set<T>
[src]fn hash_in_heap<H: Hasher>(&self, heap: &Heap, state: &mut H)
[src]
impl<T: Boxed> PartialEqInHeap for Set<T>
[src]
impl<T: Boxed> PartialEqInHeap for Set<T>
[src]fn eq_in_heap(&self, heap: &Heap, other: &Set<T>) -> bool
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Set<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Set<T> where
T: Send,
T: Send,
impl<T> Sync for Set<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Set<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Set<T> where
T: UnwindSafe,
T: UnwindSafe,