Struct slack_hook::Field [] [src]

pub struct Field {
    pub title: String,
    pub value: SlackText,
    pub short: Option<bool>,
}

Fields are defined as an array, and hashes contained within it will be displayed in a table inside the message attachment.

Fields

title: String

Shown as a bold heading above the value text. It cannot contain markup and will be escaped for you.

value: SlackText

The text value of the field. It may contain standard message markup and must be escaped as normal. May be multi-line.

short: Option<bool>

An optional flag indicating whether the value is short enough to be displayed side-by-side with other values.

Methods

impl Field
[src]

fn new(title: &str, value: &str, short: Option<bool>) -> Field

Construct a new field

Trait Implementations

impl Debug for Field
[src]

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

Formats the value using the given formatter.

impl Encodable for Field
[src]

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