#[non_exhaustive]pub struct MailboxComparator {
pub property: MailboxComparatorProperty,
pub is_ascending: bool,
pub collation: Option<String>,
}Expand description
Sort comparator for Mailbox/query (RFC 8621 §2.3).
Out of scope for extras preservation for the same reason as
EmailComparator: backends dispatch on property.
Build one with MailboxComparator::new; the struct is
#[non_exhaustive].
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.property: MailboxComparatorPropertyThe property to sort by.
is_ascending: boolIf true, sort ascending; if false, sort descending.
Defaults to true per RFC 8620 §5.5.
collation: Option<String>Collation algorithm (e.g. "i;unicode-casemap").
Implementations§
Source§impl MailboxComparator
impl MailboxComparator
Sourcepub fn new(property: MailboxComparatorProperty) -> Self
pub fn new(property: MailboxComparatorProperty) -> Self
An ascending comparator on property with no collation
(isAscending defaults to true, RFC 8620 §5.5).
Trait Implementations§
Source§impl Clone for MailboxComparator
impl Clone for MailboxComparator
Source§impl Debug for MailboxComparator
impl Debug for MailboxComparator
Source§impl<'de> Deserialize<'de> for MailboxComparator
impl<'de> Deserialize<'de> for MailboxComparator
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MailboxComparator
Source§impl PartialEq for MailboxComparator
impl PartialEq for MailboxComparator
Source§impl Serialize for MailboxComparator
impl Serialize for MailboxComparator
impl StructuralPartialEq for MailboxComparator
Auto Trait Implementations§
impl Freeze for MailboxComparator
impl RefUnwindSafe for MailboxComparator
impl Send for MailboxComparator
impl Sync for MailboxComparator
impl Unpin for MailboxComparator
impl UnsafeUnpin for MailboxComparator
impl UnwindSafe for MailboxComparator
Blanket Implementations§
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