[−][src]Struct melib::email::Envelope
Envelope
represents all the header and structure data of an email we need to know.
Attachments (the email's body) is parsed on demand with body
method.
To access the email attachments, you need to parse them from the raw email bytes into an
Attachment
object.
Fields
hash: EnvelopeHash
date: String
timestamp: UnixTimestamp
from: SmallVec<[Address; 1]>
to: SmallVec<[Address; 1]>
cc: SmallVec<[Address; 1]>
bcc: Vec<Address>
subject: Option<String>
message_id: MessageID
in_reply_to: Option<MessageID>
references: Option<References>
other_headers: HeaderMap
thread: ThreadNodeHash
flags: Flag
has_attachments: bool
labels: SmallVec<[u64; 8]>
Implementations
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 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) -> &[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) -> &[Address]
[src]
pub fn field_to_to_string(&self) -> String
[src]
pub fn field_references_to_string(&self) -> String
[src]
pub fn body_bytes(&self, bytes: &[u8]) -> Attachment
[src]
pub fn headers<'a>(&self, bytes: &'a [u8]) -> Result<Vec<(&'a str, &'a str)>>
[src]
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: SmallVec<[Address; 1]>)
[src]
pub fn set_from(&mut self, new_val: SmallVec<[Address; 1]>)
[src]
pub fn set_to(&mut self, new_val: SmallVec<[Address; 1]>)
[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_ref: MessageID)
[src]
pub fn set_references(&mut self, new_val: &[u8])
[src]
pub fn references(&self) -> SmallVec<[&MessageID; 8]>
[src]
pub fn other_headers(&self) -> &HeaderMap
[src]
pub fn other_headers_mut(&mut self) -> &mut HeaderMap
[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)
[src]
pub fn set_flags(&mut self, f: Flag)
[src]
pub fn flags(&self) -> Flag
[src]
pub fn set_seen(&mut self)
[src]
pub fn set_unseen(&mut self)
[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 From<EmailObject> for Envelope
[src]
fn from(t: EmailObject) -> Envelope
[src]
impl FromSql for Envelope
[src]
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
[src]
impl Ord for Envelope
[src]
fn cmp(&self, other: &Envelope) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]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 QueryTrait for Envelope
[src]
impl Serialize for Envelope
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl ToSql 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: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,