Enum imap_types::core::Charset
source · pub enum Charset<'a> {
Atom(Atom<'a>),
Quoted(Quoted<'a>),
}
Expand description
A charset.
ABNF definition
Note: IMAP is not very clear on what constitutes a charset string. We try to figure it out by
looking at the search
rule. (See #266.)
search = "SEARCH" [SP "CHARSET" SP astring] 1*(SP search-key)
; ^^^^^^^
; |
; `Charset`
So, it seems that it should be an AString
. However the IMAP standard also points to …
mime-charset = 1*mime-charset-chars
mime-charset-chars = ALPHA / DIGIT /
"!" / "#" / "$" / "%" / "&" /
"'" / "+" / "-" / "^" / "_" /
"`" / "{" / "}" / "~"
ALPHA = "A".."Z" ; Case insensitive ASCII Letter
DIGIT = "0".."9" ; Numeric digit
Variants§
Trait Implementations§
source§impl<'a, 'arbitrary: 'a> Arbitrary<'arbitrary> for Charset<'a>
impl<'a, 'arbitrary: 'a> Arbitrary<'arbitrary> for Charset<'a>
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl<'de, 'a> Deserialize<'de> for Charset<'a>
impl<'de, 'a> Deserialize<'de> for Charset<'a>
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
source§impl<'a> IntoBoundedStatic for Charset<'a>
impl<'a> IntoBoundedStatic for Charset<'a>
source§impl<'a> PartialEq<Charset<'a>> for Charset<'a>
impl<'a> PartialEq<Charset<'a>> for Charset<'a>
source§impl<'a> ToBoundedStatic for Charset<'a>
impl<'a> ToBoundedStatic for Charset<'a>
impl<'a> Eq for Charset<'a>
impl<'a> StructuralEq for Charset<'a>
impl<'a> StructuralPartialEq for Charset<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Charset<'a>
impl<'a> Send for Charset<'a>
impl<'a> Sync for Charset<'a>
impl<'a> Unpin for Charset<'a>
impl<'a> UnwindSafe for Charset<'a>
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