#[non_exhaustive]pub struct NamespaceDescriptor {
pub prefix: String,
pub delimiter: Option<char>,
pub extensions: Vec<(String, Vec<String>)>,
}Expand description
A single namespace entry from a NAMESPACE response (RFC 2342).
RFC 2342 Section 6 ABNF:
Namespace = nil / "(" 1*( "(" string SP (<"> QUOTED_CHAR <"> / nil)
*(Namespace_Response_Extension) ")" ) ")"
Namespace_Response_Extension = SP string SP "(" string *(SP string) ")"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.prefix: StringNamespace prefix (e.g. "", "INBOX.", "#shared.") (RFC 2342 Section 5).
delimiter: Option<char>Hierarchy delimiter for this namespace, or None if flat (RFC 2342 Section 5).
extensions: Vec<(String, Vec<String>)>Extension key-value-list pairs (RFC 2342 Section 6).
Each entry is (key, values) where key is a string and values is a
non-empty list of strings, corresponding to one
Namespace_Response_Extension = SP string SP "(" string *(SP string) ")".
Trait Implementations§
Source§impl Clone for NamespaceDescriptor
impl Clone for NamespaceDescriptor
Source§fn clone(&self) -> NamespaceDescriptor
fn clone(&self) -> NamespaceDescriptor
Returns a duplicate 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 NamespaceDescriptor
impl Debug for NamespaceDescriptor
Source§impl Default for NamespaceDescriptor
impl Default for NamespaceDescriptor
Source§fn default() -> NamespaceDescriptor
fn default() -> NamespaceDescriptor
Returns the “default value” for a type. Read more
Source§impl Hash for NamespaceDescriptor
impl Hash for NamespaceDescriptor
Source§impl PartialEq for NamespaceDescriptor
impl PartialEq for NamespaceDescriptor
impl Eq for NamespaceDescriptor
impl StructuralPartialEq for NamespaceDescriptor
Auto Trait Implementations§
impl Freeze for NamespaceDescriptor
impl RefUnwindSafe for NamespaceDescriptor
impl Send for NamespaceDescriptor
impl Sync for NamespaceDescriptor
impl Unpin for NamespaceDescriptor
impl UnsafeUnpin for NamespaceDescriptor
impl UnwindSafe for NamespaceDescriptor
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