Enum imap_codec::response::data::SpecificFields
source · pub enum SpecificFields<'a> {
Basic {
type_: IString<'a>,
subtype: IString<'a>,
},
Message {
envelope: Box<Envelope<'a>, Global>,
body_structure: Box<BodyStructure<'a>, Global>,
number_of_lines: u32,
},
Text {
subtype: IString<'a>,
number_of_lines: u32,
},
}Variants§
Basic
Fields
Example (not in RFC)
Single application/{voodoo, unknown, whatever, meh} is represented as “basic”
(
"application" "voodoo" NIL NIL NIL "7bit" 20
^^^ ^^^ ^^^ ^^^^^^ ^^
| | | | | size
| | | | content transfer encoding
| | | description
| | id
| parameter list
NIL NIL NIL NIL
^^^ ^^^ ^^^ ^^^
| | | | location
| | | language
| | disposition
| md5
)
Message
Fields
§
body_structure: Box<BodyStructure<'a>, Global>body structure,
Example (not in RFC)
Single message/rfc822 is represented as “message”
(
"message" "rfc822" NIL NIL NIL "7bit" 123
^^^ ^^^ ^^^ ^^^^^^ ^^^
| | | | | size
| | | | content transfer encoding
| | | description
| | id
| parameter list
# envelope
(
NIL "message.inner.subject.ljcwooqy" ((NIL NIL "extern" "company.com")) ((NIL NIL "extern" "company.com")) ((NIL NIL "extern" "company.com")) ((NIL NIL "admin" "seurity.com")) NIL NIL NIL NIL
)
# body structure
(
"text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 31
2
NIL NIL NIL NIL
)
6
^
| number of lines
NIL NIL NIL NIL
^^^ ^^^ ^^^ ^^^
| | | | location
| | | language
| | disposition
| md5
)
A body type of type MESSAGE and subtype RFC822 contains, immediately after the basic fields,
Text
Example (not in RFC)
Single text/plain is represented as “text”
(
"text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 25
^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^ ^^
| | | | | size
| | | | content transfer encoding
| | | description
| | id
| parameter list
1
^
| number of lines
NIL NIL NIL NIL
^^^ ^^^ ^^^ ^^^
| | | | location
| | | language
| | disposition
| md5
)
A body type of type TEXT contains, immediately after the basic fields,
Trait Implementations§
source§impl<'a> Clone for SpecificFields<'a>
impl<'a> Clone for SpecificFields<'a>
source§fn clone(&self) -> SpecificFields<'a>
fn clone(&self) -> SpecificFields<'a>
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<'a> Debug for SpecificFields<'a>
impl<'a> Debug for SpecificFields<'a>
source§impl<'a> Hash for SpecificFields<'a>
impl<'a> Hash for SpecificFields<'a>
source§impl<'a> PartialEq<SpecificFields<'a>> for SpecificFields<'a>
impl<'a> PartialEq<SpecificFields<'a>> for SpecificFields<'a>
source§fn eq(&self, other: &SpecificFields<'a>) -> bool
fn eq(&self, other: &SpecificFields<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.