[−][src]Struct imap::types::Fetch
An IMAP FETCH
response that contains
data about a particular message. This response occurs as the result of a FETCH
or STORE
command, as well as by unilateral server decision (e.g., flag updates).
Fields
message: Seq
The ordinal number of this message in its containing mailbox.
uid: Option<Uid>
A number expressing the unique identifier of the message.
Only present if UID
was specified in the query argument to FETCH
and the server
supports UIDs.
size: Option<u32>
A number expressing the RFC-2822 size of the message.
Only present if RFC822.SIZE
was specified in the query argument to FETCH
.
Implementations
impl Fetch
[src]
pub fn flags(&self) -> &[Flag<'_>]
[src]
A list of flags that are set for this message.
pub fn header(&self) -> Option<&[u8]>
[src]
The bytes that make up the header of this message, if BODY[HEADER]
, BODY.PEEK[HEADER]
,
or RFC822.HEADER
was included in the query
argument to FETCH
.
pub fn body(&self) -> Option<&[u8]>
[src]
The bytes that make up this message, included if BODY[]
or RFC822
was included in the
query
argument to FETCH
. The bytes SHOULD be interpreted by the client according to the
content transfer encoding, body type, and subtype.
pub fn text(&self) -> Option<&[u8]>
[src]
The bytes that make up the text of this message, included if BODY[TEXT]
, RFC822.TEXT
,
or BODY.PEEK[TEXT]
was included in the query
argument to FETCH
. The bytes SHOULD be
interpreted by the client according to the content transfer encoding, body type, and
subtype.
pub fn envelope(&self) -> Option<&Envelope<'_>>
[src]
The envelope of this message, if ENVELOPE
was included in the query
argument to
FETCH
. This is computed by the server by parsing the
RFC-2822 header into the component parts, defaulting
various fields as necessary.
The full description of the format of the envelope is given in RFC 3501 section 7.4.2.
pub fn section(&self, path: &SectionPath) -> Option<&[u8]>
[src]
Extract the bytes that makes up the given BOD[<section>]
of a FETCH
response.
See section 7.4.2 of RFC 3501 for details.
pub fn internal_date(&self) -> Option<DateTime<FixedOffset>>
[src]
Extract the INTERNALDATE
of a FETCH
response
See section 2.3.3 of RFC 3501 for details.
pub fn bodystructure<'a>(&self) -> Option<&BodyStructure<'a>>
[src]
Extract the BODYSTRUCTURE
of a FETCH
response
See section 2.3.6 of RFC 3501 for details.
Trait Implementations
impl Debug for Fetch
[src]
impl Eq for Fetch
[src]
impl PartialEq<Fetch> for Fetch
[src]
impl StructuralEq for Fetch
[src]
impl StructuralPartialEq for Fetch
[src]
Auto Trait Implementations
impl RefUnwindSafe for Fetch
[src]
impl Send for Fetch
[src]
impl Sync for Fetch
[src]
impl Unpin for Fetch
[src]
impl UnwindSafe for Fetch
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,