[][src]Struct mtots_core::GMap

pub struct GMap<S, K, V, EqF, HashF, E> where
    EqF: FailableEq<S, K, E>,
    HashF: FailableHash<S, K, E>, 
{ /* fields omitted */ }

Implementations

impl<K, V, S, EqF, HashF, E> GMap<S, K, V, EqF, HashF, E> where
    EqF: FailableEq<S, K, E>,
    HashF: FailableHash<S, K, E>, 
[src]

pub fn new() -> GMap<S, K, V, EqF, HashF, E>[src]

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

Returns the number of changes made to the map since it was created This can be used to detect whether a given map has been mutated over time

pub fn s_insert(
    &mut self,
    state: &mut S,
    key: K,
    value: V
) -> Result<Option<V>, E>
[src]

pub fn s_remove(&mut self, state: &mut S, key: &K) -> Result<Option<V>, E>[src]

pub fn s_get(&self, state: &mut S, key: &K) -> Result<Option<&V>, E>[src]

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

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

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

Should almost never need to be used See doc on method get_pair_at_index

pub fn get_pair_at_index(&self, i: usize) -> Option<&(K, V)>[src]

This will retrieve the (key, value) pair at the given index This is a semi-private method in the sense that, you normally should never really need it However, this method, together with reserved_entries_count is needed for implementing Map iterators in mtots

pub fn s_eq<EqVF>(&self, state: &mut S, other: &Self) -> Result<bool, E> where
    EqVF: FailableEq<S, V, E>, 
[src]

pub fn iter(&self) -> GMapRefIter<K, V>[src]

pub fn keys(&self) -> GMapRefKeysIter<K, V>[src]

impl<K, V> GMap<(), K, V, DefaultEqF<K>, DefaultHashF<K>, ()> where
    K: Eq + Hash
[src]

Some convenience methods for the default case

pub fn get(&self, key: &K) -> Option<&V>[src]

pub fn insert(&mut self, key: K, value: V) -> Option<V>[src]

pub fn remove(&mut self, key: &K) -> Option<V>[src]

Trait Implementations

impl<K, V, S, EqF, HashF, E> Clone for GMap<S, K, V, EqF, HashF, E> where
    EqF: FailableEq<S, K, E>,
    HashF: FailableHash<S, K, E>,
    K: Clone,
    V: Clone
[src]

impl<K, V, S, EqF, HashF, E> Debug for GMap<S, K, V, EqF, HashF, E> where
    EqF: FailableEq<S, K, E>,
    HashF: FailableHash<S, K, E>,
    K: Debug,
    V: Debug
[src]

impl From<GMap<Globals, Value, (), Eval, Eval, ErrorIndicator>> for Value[src]

impl From<GMap<Globals, Value, Value, Eval, Eval, ErrorIndicator>> for Value[src]

impl<S, K, V, EqF, HashF, E> IntoIterator for GMap<S, K, V, EqF, HashF, E> where
    EqF: FailableEq<S, K, E>,
    HashF: FailableHash<S, K, E>, 
[src]

type Item = (K, V)

The type of the elements being iterated over.

type IntoIter = GMapIntoIter<K, V>

Which kind of iterator are we turning this into?

impl<'a, S, K, V, EqF, HashF, E> IntoIterator for &'a GMap<S, K, V, EqF, HashF, E> where
    EqF: FailableEq<S, K, E>,
    HashF: FailableHash<S, K, E>, 
[src]

type Item = &'a (K, V)

The type of the elements being iterated over.

type IntoIter = GMapRefIter<'a, K, V>

Which kind of iterator are we turning this into?

impl<K, V> PartialEq<GMap<(), K, V, DefaultEqF<K>, DefaultHashF<K>, ()>> for HMap<K, V> where
    K: Eq + Hash,
    V: PartialEq
[src]

Auto Trait Implementations

impl<S, K, V, EqF, HashF, E> RefUnwindSafe for GMap<S, K, V, EqF, HashF, E> where
    E: RefUnwindSafe,
    EqF: RefUnwindSafe,
    HashF: RefUnwindSafe,
    K: RefUnwindSafe,
    S: RefUnwindSafe,
    V: RefUnwindSafe

impl<S, K, V, EqF, HashF, E> !Send for GMap<S, K, V, EqF, HashF, E>

impl<S, K, V, EqF, HashF, E> !Sync for GMap<S, K, V, EqF, HashF, E>

impl<S, K, V, EqF, HashF, E> Unpin for GMap<S, K, V, EqF, HashF, E> where
    K: Unpin,
    V: Unpin

impl<S, K, V, EqF, HashF, E> UnwindSafe for GMap<S, K, V, EqF, HashF, E> where
    E: RefUnwindSafe,
    EqF: RefUnwindSafe,
    HashF: RefUnwindSafe,
    K: UnwindSafe,
    S: RefUnwindSafe,
    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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.