pub struct SORT_METHOD_LOOKUP { /* private fields */ }

Methods from Deref<Target = EnumMap<SortMethod, &'static str>>

An iterator visiting all values. The iterator type is &V.

Examples
use enum_map::enum_map;

let map = enum_map! { false => 3, true => 4 };
let mut values = map.values();
assert_eq!(values.next(), Some(&3));
assert_eq!(values.next(), Some(&4));
assert_eq!(values.next(), None);

Returns an iterator over enum map.

The iteration order is deterministic, and when using [macro@Enum] derive it will be the order in which enum variants are declared.

Examples
use enum_map::{enum_map, Enum};

#[derive(Enum, PartialEq)]
enum E {
    A,
    B,
    C,
}

let map = enum_map! { E::A => 1, E::B => 2, E::C => 3};
assert!(map.iter().eq([(E::A, &1), (E::B, &2), (E::C, &3)]));

Returns number of elements in enum map.

Converts an enum map to a slice representing values.

The order of elements is deterministic, and when using [macro@Enum] derive it will be the order in which enum variants are declared.

Examples
use enum_map::{enum_map, Enum};

#[derive(Enum, PartialEq)]
enum E {
    A,
    B,
    C,
}

let map = enum_map! { E::A => 1, E::B => 2, E::C => 3};
assert_eq!(map.as_slice(), &[1, 2, 3]);

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more