Struct smtpapi::Filter [] [src]

pub struct Filter {
    // some fields omitted
}

Methods

impl Filter

fn new() -> Filter

Constructs a new Filter.

Examples

use smtpapi::{Filter};

let filter = Filter::new();
println!("{}", filter.to_string());

fn add_setting<S>(&mut self, setting: S, value: S) -> &mut Filter where S: Into<String>

Add settings for a Filter.

Examples

use smtpapi::{Filter};

let mut filter = Filter::new();
filter.add_setting("enabled", "1");
filter.add_setting("text", "some text");

println!("{}", filter.to_string());

fn to_string(&self) -> String

Returns the JSON String reprezentation of Filter.

Examples

use smtpapi::{Filter};

let filter = Filter::new();
println!("{}", filter.to_string());

Trait Implementations

impl Display for Filter

fn fmt(&self, f: &mut Formatter) -> Result

impl Drop for Filter

fn drop(&mut self)

impl ToJson for Filter

fn to_json(&self) -> Json

Derived Implementations

impl Clone for Filter

fn clone(&self) -> Filter

fn clone_from(&mut self, source: &Self)

impl Debug for Filter

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Encodable for Filter

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Decodable for Filter

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Filter, __D::Error>