[−][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 Result
s.
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]
F: FnMut(&mut T) -> Result<N, E>,
Create a new Vec1
by mapping mutable references to the elements of
self
to Result
s.
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]
F: FnMut(&mut T) -> K,
K: PartialEq<K>,
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,
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]
&mut self,
range: R,
replace_with: I
) -> Result<Splice<<I as IntoIterator>::IntoIter>, Size0Error> where
I: IntoIterator<Item = T>,
R: RangeBounds<usize>,
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 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]
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.
fn deref(&self) -> &Self::Target
[src]
impl Serialize for MessageIdList
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for MessageIdList
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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 Send for MessageIdList
impl Sync for MessageIdList
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Erased for T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,