Struct arret_runtime::boxed::Set[][src]

#[repr(C, align(16))]
pub struct Set<T: Boxed = Any> { /* fields omitted */ }

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]

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]

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]

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> Boxed for Set<T>[src]

impl ConstTagged for Set[src]

impl<T: Boxed> Debug for Set<T>[src]

impl DistinctTagged for Set[src]

impl<T: Boxed> Drop for Set<T>[src]

impl<T: Boxed> EncodeBoxedAbiType for Set<T> where
    T: EncodeBoxedAbiType
[src]

impl<T: Boxed> HashInHeap for Set<T>[src]

impl<T: Boxed> PartialEqInHeap for Set<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Set<T> where
    T: RefUnwindSafe

impl<T> Send for Set<T> where
    T: Send

impl<T> Sync for Set<T> where
    T: Sync

impl<T> Unpin for Set<T> where
    T: Unpin

impl<T> UnwindSafe for Set<T> where
    T: 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, 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.