Struct email::search_query::sort::SearchEmailsSorter
source · pub struct SearchEmailsSorter(pub SearchEmailsSorterKind, pub SearchEmailsSorterOrder);Expand description
The search emails sorter.
The sorter is composed of a kind (date, from, to, subject) and an order (ascending, descending).
Tuple Fields§
§0: SearchEmailsSorterKindThe search emails sorter kind.
1: SearchEmailsSorterOrderThe search emails sorter order.
Implementations§
source§impl SearchEmailsSorter
impl SearchEmailsSorter
pub fn to_imap_sort_criterion(&self) -> SortCriterion<'_>
source§impl SearchEmailsSorter
impl SearchEmailsSorter
pub fn cmp_envelopes(&self, a: &Envelope, b: &Envelope) -> Ordering
source§impl SearchEmailsSorter
impl SearchEmailsSorter
sourcepub fn new(kind: SearchEmailsSorterKind, order: SearchEmailsSorterOrder) -> Self
pub fn new(kind: SearchEmailsSorterKind, order: SearchEmailsSorterOrder) -> Self
Create a new search emails sorter from a kind and an order.
Trait Implementations§
source§impl Clone for SearchEmailsSorter
impl Clone for SearchEmailsSorter
source§fn clone(&self) -> SearchEmailsSorter
fn clone(&self) -> SearchEmailsSorter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SearchEmailsSorter
impl Debug for SearchEmailsSorter
source§impl From<(SearchEmailsSorterKind, Option<SearchEmailsSorterOrder>)> for SearchEmailsSorter
impl From<(SearchEmailsSorterKind, Option<SearchEmailsSorterOrder>)> for SearchEmailsSorter
source§fn from(
(kind, order): (SearchEmailsSorterKind, Option<SearchEmailsSorterOrder>)
) -> Self
fn from( (kind, order): (SearchEmailsSorterKind, Option<SearchEmailsSorterOrder>) ) -> Self
Converts to this type from the input type.
source§impl From<(SearchEmailsSorterKind, SearchEmailsSorterOrder)> for SearchEmailsSorter
impl From<(SearchEmailsSorterKind, SearchEmailsSorterOrder)> for SearchEmailsSorter
source§fn from(
(kind, order): (SearchEmailsSorterKind, SearchEmailsSorterOrder)
) -> Self
fn from( (kind, order): (SearchEmailsSorterKind, SearchEmailsSorterOrder) ) -> Self
Converts to this type from the input type.
source§impl From<SearchEmailsSorterKind> for SearchEmailsSorter
impl From<SearchEmailsSorterKind> for SearchEmailsSorter
source§fn from(kind: SearchEmailsSorterKind) -> Self
fn from(kind: SearchEmailsSorterKind) -> Self
Converts to this type from the input type.
source§impl Ord for SearchEmailsSorter
impl Ord for SearchEmailsSorter
source§fn cmp(&self, other: &SearchEmailsSorter) -> Ordering
fn cmp(&self, other: &SearchEmailsSorter) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SearchEmailsSorter
impl PartialEq for SearchEmailsSorter
source§fn eq(&self, other: &SearchEmailsSorter) -> bool
fn eq(&self, other: &SearchEmailsSorter) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for SearchEmailsSorter
impl PartialOrd for SearchEmailsSorter
source§fn partial_cmp(&self, other: &SearchEmailsSorter) -> Option<Ordering>
fn partial_cmp(&self, other: &SearchEmailsSorter) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for SearchEmailsSorter
impl StructuralPartialEq for SearchEmailsSorter
Auto Trait Implementations§
impl Freeze for SearchEmailsSorter
impl RefUnwindSafe for SearchEmailsSorter
impl Send for SearchEmailsSorter
impl Sync for SearchEmailsSorter
impl Unpin for SearchEmailsSorter
impl UnwindSafe for SearchEmailsSorter
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.