indexmap::set

Type Alias Bucket

Source
type Bucket<T> = Bucket<T, ()>;

Aliased Type§

struct Bucket<T> {
    pub(crate) hash: HashValue,
    pub(crate) key: T,
    pub(crate) value: (),
}

Fields§

§hash: HashValue§key: T§value: ()

Implementations

Source§

impl<K, V> Bucket<K, V>

Source

pub(crate) fn key_ref(&self) -> &K

Source

pub(crate) fn value_ref(&self) -> &V

Source

pub(crate) fn value_mut(&mut self) -> &mut V

Source

pub(crate) fn key(self) -> K

Source

pub(crate) fn value(self) -> V

Source

pub(crate) fn key_value(self) -> (K, V)

Source

pub(crate) fn refs(&self) -> (&K, &V)

Source

pub(crate) fn ref_mut(&mut self) -> (&K, &mut V)

Source

pub(crate) fn muts(&mut self) -> (&mut K, &mut V)

Trait Implementations

Source§

impl<K, V> Clone for Bucket<K, V>
where K: Clone, V: Clone,

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
Source§

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

Performs copy-assignment from source. Read more
Source§

impl<K: Debug, V: Debug> Debug for Bucket<K, V>

Source§

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

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

impl<K: Copy, V: Copy> Copy for Bucket<K, V>