[−][src]Struct mail_headers::header_components::MessageIdList
Methods from Deref<Target = Vec1<MessageId>>
pub fn mapped_ref<F, N>(&self, map_fn: F) -> Vec1<N> where
F: FnMut(&T) -> N, [src]
F: FnMut(&T) -> N,
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]
F: FnMut(&mut T) -> N,
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]
F: FnMut(&T) -> Result<N, E>,
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.
Errors
Once any call to map_fn returns a error that error is directly
returned by this method.
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]
F: FnMut(&mut T) -> Result<N, E>,
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.
Errors
Once any call to map_fn returns a error that error is directly
returned by this method.
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]
Truncates the vec1 to given length.
Errors
If len is 0 an error is returned as the length >= 1 constraint must be uphold.
pub fn try_swap_remove(&mut self, index: usize) -> Result<T, Size0Error>[src]
Calls swap_remove on the inner vec if length >= 2.
Errors
If len is 1 an error is returned as the length >= 1 constraint must be uphold.
pub fn try_remove(&mut self, index: usize) -> Result<T, Size0Error>[src]
Calls remove on the inner vec if length >= 2.
Errors
If len is 1 an error is returned as the length >= 1 constraint must be uphold.
pub fn try_split_off(&mut self, at: usize) -> Result<Vec1<T>, Size0Error>[src]
Calls split_of on the inner vec if both resulting parts have length >= 1.
Errors
If after the split any part would be empty an error is returned as the length >= 1 constraint must be uphold.
pub fn dedup_by_key<F, K>(&mut self, key: F) where
F: FnMut(&mut T) -> K,
K: PartialEq<K>, [src]
F: FnMut(&mut T) -> K,
K: PartialEq<K>,
Calls dedup_by_key on the inner vec.
While this can remove elements it will never produce a empty vector from an non empty vector.
pub fn dedup_by<F>(&mut self, same_bucket: F) where
F: FnMut(&mut T, &mut T) -> bool, [src]
F: FnMut(&mut T, &mut T) -> bool,
Calls dedup_by_key on the inner vec.
While this can remove elements it will never produce a empty vector from an non empty vector.
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).
Errors
If len is 1 an error is returned as the length >= 1 constraint must be uphold.
pub fn as_vec(&self) -> &Vec<T>[src]
Return a reference to the underlying Vec.
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]
&mut self,
range: R,
replace_with: I
) -> Result<Splice<<I as IntoIterator>::IntoIter>, Size0Error> where
I: IntoIterator<Item = T>,
R: RangeBounds<usize>,
Calls splice on the underlying vec if it will not produce an empty vec.
Errors
If range covers the whole vec and the replacement iterator doesn't yield any value an error is returned.
This means that if an error is returned next might still have been called
once on the replace_with iterator.
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]
Calls resize on the underlying Vec if new_len >= 1.
Errors
If the new_len is 0 an error is returned as
the length >= 1 constraint must be uphold.
pub fn extend_from_slice(&mut self, other: &[T])[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(&self) -> MessageIdList[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for MessageIdList[src]
impl Deref for MessageIdList[src]
type Target = Vec1<MessageId>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
impl DerefMut for MessageIdList[src]
impl EncodableInHeader for MessageIdList[src]
fn encode(&self, handle: &mut EncodingWriter) -> Result<(), EncodingError>[src]
fn boxed_clone(&self) -> Box<dyn EncodableInHeader>[src]
Auto Trait Implementations
impl RefUnwindSafe for MessageIdList
impl Send for MessageIdList
impl Sync for MessageIdList
impl Unpin for MessageIdList
impl UnwindSafe for MessageIdList
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Erased for T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,