[][src]Struct mail_headers::header_components::MessageIdList

pub struct MessageIdList(pub Vec1<MessageId>);

Methods from Deref<Target = Vec1<MessageId>>

pub fn mapped_ref<F, N>(&self, map_fn: F) -> Vec1<N> where
    F: FnMut(&T) -> N, 
[src]

Create a new Vec1 by mapping references to the elements of self.

The benefit to this compared to Iterator::map is that it's known that the length will still be at least 1 when creating the new Vec1.

pub fn mapped_mut<F, N>(&mut self, map_fn: F) -> Vec1<N> where
    F: FnMut(&mut T) -> N, 
[src]

Create a new Vec1 by mapping mutable references to the elements of self.

The benefit to this compared to Iterator::map is that it's known that the length will still be at least 1 when creating the new Vec1.

pub fn try_mapped_ref<F, N, E>(&self, map_fn: F) -> Result<Vec1<N>, E> where
    F: FnMut(&T) -> Result<N, E>, 
[src]

Create a new Vec1 by mapping references to the elements of self to Results.

The benefit to this compared to Iterator::map is that it's known that the length will still be at least 1 when creating the new Vec1.

pub fn try_mapped_mut<F, N, E>(&mut self, map_fn: F) -> Result<Vec1<N>, E> where
    F: FnMut(&mut T) -> Result<N, E>, 
[src]

Create a new Vec1 by mapping mutable references to the elements of self to Results.

The benefit to this compared to Iterator::map is that it's known that the length will still be at least 1 when creating the new Vec1.

pub fn last(&self) -> &T[src]

Returns a reference to the last element.

As Vec1 always contains at least one element there is always a last element.

pub fn last_mut(&mut self) -> &mut T[src]

Returns a mutable reference to the last element.

As Vec1 always contains at least one element there is always a last element.

pub fn first(&self) -> &T[src]

Returns a reference to the first element.

As Vec1 always contains at least one element there is always a first element.

pub fn first_mut(&mut self) -> &mut T[src]

Returns a mutable reference to the first element.

As Vec1 always contains at least one element there is always a first element.

pub fn try_truncate(&mut self, len: usize) -> Result<(), Size0Error>[src]

pub fn try_swap_remove(&mut self, index: usize) -> Result<T, Size0Error>[src]

pub fn try_remove(&mut self, index: usize) -> Result<T, Size0Error>[src]

pub fn try_split_off(&mut self, at: usize) -> Result<Vec1<T>, Size0Error>[src]

pub fn dedup_by_key<F, K>(&mut self, key: F) where
    F: FnMut(&mut T) -> K,
    K: PartialEq<K>, 
[src]

pub fn dedup_by<F>(&mut self, same_bucket: F) where
    F: FnMut(&mut T, &mut T) -> bool
[src]

pub fn try_pop(&mut self) -> Result<T, Size0Error>[src]

Tries to remove the last element from the Vec1.

Returns an error if the length is currently 1 (so the try_pop would reduce the length to 0).

pub fn as_vec(&self) -> &Vec<T>[src]

pub fn splice<R, I>(
    &mut self,
    range: R,
    replace_with: I
) -> Result<Splice<<I as IntoIterator>::IntoIter>, Size0Error> where
    I: IntoIterator<Item = T>,
    R: RangeBounds<usize>, 
[src]

pub fn to_ascii_uppercase(&self) -> Vec1<u8>[src]

Works like &[u8].to_ascii_uppercase() but returns a Vec1<T> instead of a Vec<T>

pub fn to_ascii_lowercase(&self) -> Vec1<u8>[src]

Works like &[u8].to_ascii_lowercase() but returns a Vec1<T> instead of a Vec<T>

pub fn try_resize(&mut self, new_len: usize, value: T) -> Result<(), Size0Error>[src]

pub fn extend_from_slice(&mut self, other: &[T])[src]

pub fn dedub(&mut self)[src]

pub fn dedup(&mut self)[src]

pub fn reserve(&mut self, additional: usize)[src]

pub fn reserve_exact(&mut self, additional: usize)[src]

pub fn shrink_to_fit(&mut self)[src]

pub fn as_mut_slice(&mut self) -> &mut [T][src]

pub fn push(&mut self, value: T)[src]

pub fn append(&mut self, other: &mut Vec<T>)[src]

pub fn insert(&mut self, idx: usize, val: T)[src]

pub fn len(&self) -> usize[src]

pub fn capacity(&self) -> usize[src]

pub fn as_slice(&self) -> &[T][src]

Trait Implementations

impl Clone for MessageIdList[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl DerefMut for MessageIdList[src]

impl Debug for MessageIdList[src]

impl Deref for MessageIdList[src]

type Target = Vec1<MessageId>

The resulting type after dereferencing.

impl Serialize for MessageIdList[src]

impl<'de> Deserialize<'de> for MessageIdList[src]

impl EncodableInHeader for MessageIdList[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]