Struct newsapi::constants::SORT_METHOD_LOOKUP
source · [−]pub struct SORT_METHOD_LOOKUP { /* private fields */ }
Methods from Deref<Target = EnumMap<SortMethod, &'static str>>
sourcepub fn values(&self) -> Values<'_, V>
pub fn values(&self) -> Values<'_, V>
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);
sourcepub fn iter(&self) -> Iter<'_, K, V>
pub fn iter(&self) -> Iter<'_, K, V>
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)]));
sourcepub fn as_slice(&self) -> &[V]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
pub fn as_slice(&self) -> &[V]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
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
sourceimpl Deref for SORT_METHOD_LOOKUP
impl Deref for SORT_METHOD_LOOKUP
type Target = EnumMap<SortMethod, &'static str>
type Target = EnumMap<SortMethod, &'static str>
The resulting type after dereferencing.
sourcefn deref(&self) -> &EnumMap<SortMethod, &'static str>
fn deref(&self) -> &EnumMap<SortMethod, &'static str>
Dereferences the value.
impl LazyStatic for SORT_METHOD_LOOKUP
Auto Trait Implementations
impl RefUnwindSafe for SORT_METHOD_LOOKUP
impl Send for SORT_METHOD_LOOKUP
impl Sync for SORT_METHOD_LOOKUP
impl Unpin for SORT_METHOD_LOOKUP
impl UnwindSafe for SORT_METHOD_LOOKUP
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more