[−][src]Struct mtots_core::GMap
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]
EqF: FailableEq<S, K, E>,
HashF: FailableHash<S, K, E>,
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]
&mut self,
state: &mut S,
key: K,
value: V
) -> Result<Option<V>, E>
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]
EqVF: FailableEq<S, V, E>,
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]
K: Eq + Hash,
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]
EqF: FailableEq<S, K, E>,
HashF: FailableHash<S, K, E>,
K: Clone,
V: Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
EqF: FailableEq<S, K, E>,
HashF: FailableHash<S, K, E>,
K: Debug,
V: Debug,
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]
EqF: FailableEq<S, K, E>,
HashF: FailableHash<S, K, E>,
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?
fn into_iter(self) -> GMapIntoIter<K, V>
[src]
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]
EqF: FailableEq<S, K, E>,
HashF: FailableHash<S, K, E>,
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?
fn into_iter(self) -> GMapRefIter<'a, K, V>
[src]
impl<K, V> PartialEq<GMap<(), K, V, DefaultEqF<K>, DefaultHashF<K>, ()>> for HMap<K, V> where
K: Eq + Hash,
V: PartialEq,
[src]
K: Eq + Hash,
V: PartialEq,
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,
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,
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,
E: RefUnwindSafe,
EqF: RefUnwindSafe,
HashF: RefUnwindSafe,
K: UnwindSafe,
S: RefUnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,