[][src]Struct mmrs::MMBody

pub struct MMBody {
    pub text: Option<String>,
    pub channel: Option<String>,
    pub username: Option<String>,
    pub icon_url: Option<String>,
    pub icon_emoji: Option<String>,
    pub attachments: Option<String>,
    pub type: Option<String>,
    pub props: Option<String>,
}

Custom struct to serialize the HTTP POST data into a json objecting using serde_json For a description of these fields see the Official MatterMost Developer Documentation

Fields

text: Option<String>channel: Option<String>username: Option<String>icon_url: Option<String>icon_emoji: Option<String>attachments: Option<String>type: Option<String>props: Option<String>

Methods

impl MMBody[src]

pub fn new() -> MMBody[src]

pub fn to_json(self) -> Result<String, MMRSError>[src]

This function allows us to convert from the struct to a string of JSON which a web server will accept

Trait Implementations

impl<'de> Deserialize<'de> for MMBody[src]

impl Serialize for MMBody[src]

Auto Trait Implementations

impl RefUnwindSafe for MMBody

impl Send for MMBody

impl Sync for MMBody

impl Unpin for MMBody

impl UnwindSafe for MMBody

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,