Skip to main content

MessageView

Trait MessageView 

Source
pub trait MessageView {
    // Required methods
    fn sender_email(&self) -> &str;
    fn to_emails(&self) -> &[String];
    fn subject(&self) -> &str;
    fn labels(&self) -> &[String];
    fn has_attachment(&self) -> bool;
    fn size_bytes(&self) -> u64;
    fn date(&self) -> DateTime<Utc>;
    fn is_unread(&self) -> bool;
    fn is_starred(&self) -> bool;
    fn has_unsubscribe(&self) -> bool;
    fn body_text(&self) -> Option<&str>;
}
Expand description

A message-like view for condition evaluation. The engine evaluates conditions against this trait so it doesn’t depend on mxr-core’s concrete Envelope type directly.

Required Methods§

Source

fn sender_email(&self) -> &str

Source

fn to_emails(&self) -> &[String]

Source

fn subject(&self) -> &str

Source

fn labels(&self) -> &[String]

Source

fn has_attachment(&self) -> bool

Source

fn size_bytes(&self) -> u64

Source

fn date(&self) -> DateTime<Utc>

Source

fn is_unread(&self) -> bool

Source

fn is_starred(&self) -> bool

Source

fn has_unsubscribe(&self) -> bool

Source

fn body_text(&self) -> Option<&str>

Implementors§