[][src]Trait milter::ActionContext

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

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

Required methods

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

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

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

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

fn remove_recipient(&self, rcpt_to: &str) -> Result<()>

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

fn add_header(&self, name: &str, value: &str) -> Result<()>

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

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

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

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

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

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

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

fn quarantine(&self, reason: &str) -> Result<()>

Quarantines a message as specified for ContextApi::quarantine.

fn signal_progress(&self) -> Result<()>

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...