[][src]Trait mailjet_rs::common::Payload

pub trait Payload {
    fn to_json(&self) -> String;
}

Every struct that is sent through the Mailjet's SendAPI must implement Payload

This trait ensures that the struct is capable of being serialized into a JSON object which is supported by the Mailjet API

Required methods

fn to_json(&self) -> String

Creates the JSON representation of self consumed by Mailjet's API

Loading content...

Implementors

impl Payload for Email[src]

impl Payload for Message[src]

Loading content...