Type Alias indexmap::set::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>