Struct arret_runtime::boxed::Map[][src]

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

Immutable map of boxed values

Implementations

impl<K: Boxed, V: Boxed> Map<K, V>[src]

pub fn new(
    heap: &mut impl AsHeap,
    values: impl ExactSizeIterator<Item = (Gc<K>, Gc<V>)>
) -> Gc<Map<K, V>>
[src]

Constructs a new map with the given values

pub fn from_values<T, F>(
    heap: &mut impl AsHeap,
    values: impl ExactSizeIterator<Item = T>,
    _cons: F
) -> Gc<Map<K, V>> where
    F: Fn(&mut Heap, T) -> (Gc<K>, Gc<V>)
[src]

Constructs a map by constructing an iterator of values

pub fn size() -> BoxSize[src]

Returns the box size for maps

pub fn is_empty(&self) -> bool[src]

Return if the map is empty

pub fn len(&self) -> usize[src]

Returns the number of the entries in the map

pub fn iter(&self) -> impl Iterator<Item = (Gc<K>, Gc<V>)> + '_[src]

Returns an iterator over the entries in map

Trait Implementations

impl<K: Boxed, V: Boxed> Boxed for Map<K, V>[src]

impl ConstTagged for Map[src]

impl<K: Boxed, V: Boxed> Debug for Map<K, V>[src]

impl DistinctTagged for Map[src]

impl<K: Boxed, V: Boxed> EncodeBoxedAbiType for Map<K, V> where
    K: EncodeBoxedAbiType,
    V: EncodeBoxedAbiType
[src]

impl<K: Boxed, V: Boxed> HashInHeap for Map<K, V>[src]

impl<K: Boxed, V: Boxed> PartialEqInHeap for Map<K, V>[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for Map<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for Map<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for Map<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for Map<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for Map<K, V> where
    K: UnwindSafe,
    V: 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.