wiwi::chain

Struct HashMapChain

Source
pub struct HashMapChain<K, V, S = DefaultHashBuilder> { /* private fields */ }

Implementations§

Source§

impl<K, V> HashMapChain<K, V>

Source

pub fn new() -> Self

Source

pub fn new_with_capacity(capacity: usize) -> Self

Source§

impl<K, V, S> HashMapChain<K, V, S>

Source

pub fn new_with_hasher(hash_builder: S) -> Self

Source

pub fn new_with_capacity_and_hasher(capacity: usize, hash_builder: S) -> Self

Source§

impl<K, V, S> HashMapChain<K, V, S>

Source

pub fn clear(self) -> Self

Source

pub fn insert(self, k: K, v: V) -> Self
where K: Eq + Hash, S: BuildHasher,

Source

pub fn insert_and_take_old<O>(self, k: K, v: V, out: O) -> Self
where K: Eq + Hash, S: BuildHasher, O: OutputStorage<Option<V>>,

Trait Implementations§

Source§

impl<K, V, S> AsChainInner<HashMap<K, V, S>> for HashMapChain<K, V, S>

Source§

fn as_inner(&self) -> &HashMap<K, V, S>

Source§

fn as_inner_mut(&mut self) -> &mut HashMap<K, V, S>

Source§

impl<K, V, S> AsMut<HashMap<K, V, S>> for HashMapChain<K, V, S>

Source§

fn as_mut(&mut self) -> &mut HashMap<K, V, S>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<K, V, S> AsRef<HashMap<K, V, S>> for HashMapChain<K, V, S>

Source§

fn as_ref(&self) -> &HashMap<K, V, S>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<K, V, S> Chain for HashMapChain<K, V, S>

Source§

type Inner = HashMap<K, V, S>

Source§

fn into_inner(self) -> Self::Inner

Source§

fn from_inner(inner: Self::Inner) -> Self

Source§

fn as_inner(&self) -> &Self::Inner

Source§

fn as_inner_mut(&mut self) -> &mut Self::Inner

Source§

fn with_inner<F, Void>(self, f: F) -> Self
where F: FnOnce(&mut Self::Inner) -> Void,

Takes a closure that is called, passing in a reference to the inner value Read more
Source§

impl<K, V, S> Clone for HashMapChain<K, V, S>
where HashMap<K, V, S>: Clone,

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K, V, S> Debug for HashMapChain<K, V, S>
where HashMap<K, V, S>: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K, V, S> Default for HashMapChain<K, V, S>
where HashMap<K, V, S>: Default,

Source§

fn default() -> Self

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

impl<K, V, S> Display for HashMapChain<K, V, S>
where HashMap<K, V, S>: Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K, V, S> From<&HashMap<K, V, S>> for HashMapChain<K, V, S>
where HashMap<K, V, S>: Clone,

Source§

fn from(inner: &HashMap<K, V, S>) -> Self

Converts to this type from the input type.
Source§

impl<K, V, S> From<&HashMapChain<K, V, S>> for HashMap<K, V, S>
where HashMap<K, V, S>: Clone,

Source§

fn from(chain: &HashMapChain<K, V, S>) -> Self

Converts to this type from the input type.
Source§

impl<K, V, S> From<&mut HashMap<K, V, S>> for HashMapChain<K, V, S>
where HashMap<K, V, S>: Clone,

Source§

fn from(inner: &mut HashMap<K, V, S>) -> Self

Converts to this type from the input type.
Source§

impl<K, V, S> From<&mut HashMapChain<K, V, S>> for HashMap<K, V, S>
where HashMap<K, V, S>: Clone,

Source§

fn from(chain: &mut HashMapChain<K, V, S>) -> Self

Converts to this type from the input type.
Source§

impl<K, V, S> From<HashMap<K, V, S>> for HashMapChain<K, V, S>

Source§

fn from(inner: HashMap<K, V, S>) -> Self

Converts to this type from the input type.
Source§

impl<K, V, S> From<HashMapChain<K, V, S>> for HashMap<K, V, S>

Source§

fn from(chain: HashMapChain<K, V, S>) -> Self

Converts to this type from the input type.
Source§

impl<K, V, S> PartialEq<HashMap<K, V, S>> for HashMapChain<K, V, S>
where HashMap<K, V, S>: PartialEq<HashMap<K, V, S>>,

Source§

fn eq(&self, other: &HashMap<K, V, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &HashMap<K, V, S>) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<K, V, S> PartialEq<HashMapChain<K, V, S>> for HashMap<K, V, S>
where HashMap<K, V, S>: PartialEq<HashMap<K, V, S>>,

Source§

fn eq(&self, other: &HashMapChain<K, V, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &HashMapChain<K, V, S>) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<K, V, S> PartialEq for HashMapChain<K, V, S>
where HashMap<K, V, S>: PartialEq<HashMap<K, V, S>>,

Source§

fn eq(&self, other: &HashMapChain<K, V, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &HashMapChain<K, V, S>) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<K, V, S> PartialOrd<HashMap<K, V, S>> for HashMapChain<K, V, S>
where HashMap<K, V, S>: PartialOrd<HashMap<K, V, S>>,

Source§

fn partial_cmp(&self, other: &HashMap<K, V, S>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, other: &HashMap<K, V, S>) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Source§

fn le(&self, other: &HashMap<K, V, S>) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
Source§

fn gt(&self, other: &HashMap<K, V, S>) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
Source§

fn ge(&self, other: &HashMap<K, V, S>) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<K, V, S> PartialOrd<HashMapChain<K, V, S>> for HashMap<K, V, S>
where HashMap<K, V, S>: PartialOrd<HashMap<K, V, S>>,

Source§

fn partial_cmp(&self, other: &HashMapChain<K, V, S>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, other: &HashMapChain<K, V, S>) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Source§

fn le(&self, other: &HashMapChain<K, V, S>) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
Source§

fn gt(&self, other: &HashMapChain<K, V, S>) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
Source§

fn ge(&self, other: &HashMapChain<K, V, S>) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<K, V, S> PartialOrd for HashMapChain<K, V, S>
where HashMap<K, V, S>: PartialOrd<HashMap<K, V, S>>,

Source§

fn partial_cmp(&self, other: &HashMapChain<K, V, S>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, other: &HashMapChain<K, V, S>) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Source§

fn le(&self, other: &HashMapChain<K, V, S>) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
Source§

fn gt(&self, other: &HashMapChain<K, V, S>) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
Source§

fn ge(&self, other: &HashMapChain<K, V, S>) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<K, V, S> Copy for HashMapChain<K, V, S>
where HashMap<K, V, S>: Copy,

Auto Trait Implementations§

§

impl<K, V, S> Freeze for HashMapChain<K, V, S>
where S: Freeze,

§

impl<K, V, S> RefUnwindSafe for HashMapChain<K, V, S>

§

impl<K, V, S> Send for HashMapChain<K, V, S>
where S: Send, K: Send, V: Send,

§

impl<K, V, S> Sync for HashMapChain<K, V, S>
where S: Sync, K: Sync, V: Sync,

§

impl<K, V, S> Unpin for HashMapChain<K, V, S>
where S: Unpin, K: Unpin, V: Unpin,

§

impl<K, V, S> UnwindSafe for HashMapChain<K, V, S>
where S: UnwindSafe, K: UnwindSafe, V: UnwindSafe,

Blanket Implementations§

Source§

impl<T> AcceptDefault<T> for T

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> Encode for T

Source§

fn encode<E>(self) -> <E as Encoding>::EncodeOutput
where T: Encodable<E>, E: Encoding,

Source§

fn decode<E>(self) -> <E as Encoding>::DecodeOutput
where T: Decodable<E>, E: Encoding,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GenericChainConversion for T

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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.