[][src]Trait milter::ActionContext

pub trait ActionContext {
    pub fn replace_sender(
        &self,
        mail_from: &str,
        esmtp_args: Option<&str>
    ) -> Result<()>;
pub fn add_recipient(
        &self,
        rcpt_to: &str,
        esmtp_args: Option<&str>
    ) -> Result<()>;
pub fn remove_recipient(&self, rcpt_to: &str) -> Result<()>;
pub fn add_header(&self, name: &str, value: &str) -> Result<()>;
pub fn insert_header(
        &self,
        index: usize,
        name: &str,
        value: &str
    ) -> Result<()>;
pub fn replace_header(
        &self,
        name: &str,
        index: usize,
        value: Option<&str>
    ) -> Result<()>;
pub fn append_body_chunk(&self, content: &[u8]) -> Result<()>;
pub fn quarantine(&self, reason: &str) -> Result<()>;
pub fn signal_progress(&self) -> Result<()>; }

A trait encapsulating the set of action methods available during the eom stage.

Required methods

pub fn replace_sender(
    &self,
    mail_from: &str,
    esmtp_args: Option<&str>
) -> Result<()>
[src]

Replaces the envelope sender of a message as specified for ContextApi::replace_sender.

pub fn add_recipient(
    &self,
    rcpt_to: &str,
    esmtp_args: Option<&str>
) -> Result<()>
[src]

Adds an envelope recipient to a message as specified for ContextApi::add_recipient.

pub fn remove_recipient(&self, rcpt_to: &str) -> Result<()>[src]

Removes an envelope recipient from a message as specified for ContextApi::remove_recipient.

pub fn add_header(&self, name: &str, value: &str) -> Result<()>[src]

Appends a header to the list of headers of a message as specified for ContextApi::add_header.

pub fn insert_header(&self, index: usize, name: &str, value: &str) -> Result<()>[src]

Inserts a header into the list of headers of a message as specified for ContextApi::insert_header.

pub fn replace_header(
    &self,
    name: &str,
    index: usize,
    value: Option<&str>
) -> Result<()>
[src]

Replaces a header in the list of headers of a message as specified for ContextApi::replace_header.

pub fn append_body_chunk(&self, content: &[u8]) -> Result<()>[src]

Appends a chunk of bytes to the new message body of a message as specified for ContextApi::append_body_chunk.

pub fn quarantine(&self, reason: &str) -> Result<()>[src]

Quarantines a message as specified for ContextApi::quarantine.

pub fn signal_progress(&self) -> Result<()>[src]

Signals to the milter library that work is in progress as specified for ContextApi::signal_progress.

Loading content...

Implementors

impl ActionContext for ContextApi[src]

Loading content...