Skip to main content

Map

Struct Map 

Source
pub struct Map<K: MapKey, V: MapValue> { /* private fields */ }

Implementations§

Source§

impl<K: MapKey, V: MapValue> Map<K, V>

Source

pub fn new() -> Self

Source

pub fn as_mut(&mut self) -> MapMut<'_, K, V>

Source

pub fn as_view(&self) -> MapView<'_, K, V>

Trait Implementations§

Source§

impl<K: MapKey, V: MapValue> AsMut for Map<K, V>

Source§

type MutProxied = Map<K, V>

Source§

fn as_mut(&mut self) -> MapMut<'_, K, V>

Converts a borrow into a Mut with the lifetime of that borrow.
Source§

impl<K: MapKey, V: MapValue> AsView for Map<K, V>

Source§

type Proxied = Map<K, V>

Source§

fn as_view(&self) -> MapView<'_, K, V>

Converts a borrow into a View with the lifetime of that borrow. Read more
Source§

impl<K: MapKey, V: MapValue> Default for Map<K, V>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<K: MapKey, V: MapValue> Drop for Map<K, V>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<'msg, K: MapKey, V: MapValue> IntoIterator for &'msg Map<K, V>

Source§

type IntoIter = MapIter<'msg, K, V>

Which kind of iterator are we turning this into?
Source§

type Item = (<K as ProtoObject>::View<'msg>, <V as ProtoObject>::View<'msg>)

The type of the elements being iterated over.
Source§

fn into_iter(self) -> MapIter<'msg, K, V> ⓘ

Creates an iterator from a value. Read more
Source§

impl<'msg, K: MapKey, V: MapValue> IntoProxied<Map<K, V>> for MapView<'msg, K, V>
where View<'msg, V>: IntoProxied<V>,

Source§

impl<'msg, K: MapKey, V: MapValue> IntoProxied<Map<K, V>> for MapMut<'msg, K, V>
where View<'msg, V>: IntoProxied<V>,

Source§

impl<K: MapKey, V: MapValue> MutProtoObject for Map<K, V>

Source§

type Mut<'msg> = MapMut<'msg, K, V>

The proxy type that provides exclusive mutable access to a T, like a &'msg mut T. Read more
Source§

impl<K: MapKey, V: MapValue> ProtoObject for Map<K, V>

Source§

type View<'msg> = MapView<'msg, K, V>

The proxy type that provides shared access to a T, like a &'msg T. Read more
Source§

impl<K: MapKey, V: MapValue> SealedInternal for Map<K, V>

Source§

impl<K: MapKey, V: MapValue> Send for Map<K, V>

Source§

impl<K: MapKey, V: MapValue> Sync for Map<K, V>

Auto Trait Implementations§

§

impl<K, V> !RefUnwindSafe for Map<K, V>

§

impl<K, V> Forget for Map<K, V>

§

impl<K, V> Freeze for Map<K, V>

§

impl<K, V> Move for Map<K, V>

§

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

§

impl<K, V> UnsafeUnpin for Map<K, V>

§

impl<K, V> UnwindSafe for Map<K, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'msg, K, KView, V, VView, I> IntoProxied<Map<K, V>> for I
where I: Iterator<Item = (KView, VView)>, K: MapKey, V: MapValue, KView: Into<<K as ProtoObject>::View<'msg>>, VView: IntoProxied<V>,

Source§

fn into_proxied(self, _: Private) -> Map<K, V>

Source§

impl<T> IntoProxied<T> for T
where T: ProtoObject,

Source§

fn into_proxied(self, _private: Private) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.