[−][src]Struct melib::email::Envelope
Envelope
represents all the data of an email we need to know.
Attachments (the email's body) is parsed on demand with body
.
Access to the underlying email object in the account's backend (for example the file or the
entry in an IMAP server) is given through operation_token
. For more information see
BackendOp
.
Fields
references: Option<References>
Methods
impl Envelope
[src]
pub fn new(hash: EnvelopeHash) -> Self
[src]
pub fn set_hash(&mut self, new_hash: EnvelopeHash)
[src]
pub fn from_bytes(bytes: &[u8], flags: Option<Flag>) -> Result<Envelope>
[src]
pub fn from_token(
operation: Box<dyn BackendOp>,
hash: EnvelopeHash
) -> Option<Envelope>
[src]
operation: Box<dyn BackendOp>,
hash: EnvelopeHash
) -> Option<Envelope>
pub fn hash(&self) -> EnvelopeHash
[src]
pub fn populate_headers(&mut self, bytes: &[u8]) -> Result<()>
[src]
pub fn date(&self) -> UnixTimestamp
[src]
pub fn datetime(&self) -> UnixTimestamp
[src]
pub fn date_as_str(&self) -> &str
[src]
pub fn from(&self) -> &Vec<Address>
[src]
pub fn field_bcc_to_string(&self) -> String
[src]
pub fn field_cc_to_string(&self) -> String
[src]
pub fn field_from_to_string(&self) -> String
[src]
pub fn to(&self) -> &Vec<Address>
[src]
pub fn field_to_to_string(&self) -> String
[src]
pub fn field_references_to_string(&self) -> String
[src]
pub fn bytes(&self, operation: Box<dyn BackendOp>) -> Result<Vec<u8>>
[src]
Requests bytes from backend and thus can fail
pub fn body_bytes(&self, bytes: &[u8]) -> Attachment
[src]
pub fn headers<'a>(&self, bytes: &'a [u8]) -> Result<Vec<(&'a str, &'a str)>>
[src]
Requests bytes from backend and thus can fail
pub fn body(&self, operation: Box<dyn BackendOp>) -> Result<Attachment>
[src]
Requests bytes from backend and thus can fail
pub fn subject(&self) -> Cow<str>
[src]
pub fn in_reply_to(&self) -> Option<&MessageID>
[src]
pub fn in_reply_to_display(&self) -> Option<Cow<str>>
[src]
pub fn in_reply_to_raw(&self) -> Option<Cow<str>>
[src]
pub fn message_id(&self) -> &MessageID
[src]
pub fn message_id_display(&self) -> Cow<str>
[src]
pub fn message_id_raw(&self) -> Cow<str>
[src]
pub fn set_date(&mut self, new_val: &[u8])
[src]
pub fn set_bcc(&mut self, new_val: Vec<Address>)
[src]
pub fn set_cc(&mut self, new_val: Vec<Address>)
[src]
pub fn set_from(&mut self, new_val: Vec<Address>)
[src]
pub fn set_to(&mut self, new_val: Vec<Address>)
[src]
pub fn set_in_reply_to(&mut self, new_val: &[u8])
[src]
pub fn set_subject(&mut self, new_val: Vec<u8>)
[src]
pub fn set_message_id(&mut self, new_val: &[u8])
[src]
pub fn push_references(&mut self, new_val: &[u8])
[src]
pub fn set_references(&mut self, new_val: &[u8])
[src]
pub fn references(&self) -> Vec<&MessageID>
[src]
pub fn other_headers(&self) -> &FnvHashMap<String, String>
[src]
pub fn other_headers_mut(&mut self) -> &mut FnvHashMap<String, String>
[src]
pub fn thread(&self) -> ThreadNodeHash
[src]
pub fn set_thread(&mut self, new_val: ThreadNodeHash)
[src]
pub fn set_datetime(&mut self, new_val: UnixTimestamp)
[src]
pub fn set_flag(
&mut self,
f: Flag,
value: bool,
operation: Box<dyn BackendOp>
) -> Result<()>
[src]
&mut self,
f: Flag,
value: bool,
operation: Box<dyn BackendOp>
) -> Result<()>
pub fn set_flags(&mut self, f: Flag)
[src]
pub fn flags(&self) -> Flag
[src]
pub fn set_seen(&mut self, operation: Box<dyn BackendOp>) -> Result<()>
[src]
pub fn set_unseen(&mut self, operation: Box<dyn BackendOp>) -> Result<()>
[src]
pub fn is_seen(&self) -> bool
[src]
pub fn set_has_attachments(&mut self, new_val: bool)
[src]
pub fn has_attachments(&self) -> bool
[src]
pub fn labels(&self) -> &SmallVec<[u64; 8]>
[src]
pub fn labels_mut(&mut self) -> &mut SmallVec<[u64; 8]>
[src]
Trait Implementations
impl Clone for Envelope
[src]
impl Debug for Envelope
[src]
impl Default for Envelope
[src]
impl<'de> Deserialize<'de> for Envelope
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Envelope
[src]
impl Ord for Envelope
[src]
fn cmp(&self, other: &Envelope) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Envelope> for Envelope
[src]
impl PartialOrd<Envelope> for Envelope
[src]
fn partial_cmp(&self, other: &Envelope) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Envelope
[src]
Auto Trait Implementations
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnwindSafe for Envelope
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,