[][src]Struct af_lib::slack::Message

pub struct Message<'a> {
    pub attachments: Vec<Attachment<'a>, Global>,
    pub text: Cow<'a, str>,
}

A chat message.

Fields

attachments: Vec<Attachment<'a>, Global>text: Cow<'a, str>

Implementations

impl<'a> Message<'a>[src]

pub const fn new() -> Message<'a>[src]

Creates a new, empty chat message.

pub fn add_attachment(&mut self, attachment: Attachment<'a>) -> &mut Message<'a>[src]

Adds an attachment to the message.

pub fn set_text(&mut self, text: impl Into<Cow<'a, str>>) -> &mut Message<'a>[src]

Sets the text of the message.

pub fn with_attachment(self, attachment: Attachment<'a>) -> Message<'a>[src]

Adds an attachment to the message.

pub fn with_text(self, text: impl Into<Cow<'a, str>>) -> Message<'a>[src]

Sets the text of the message.

Trait Implementations

impl<'a> Debug for Message<'a>[src]

impl<'a> Default for Message<'a>[src]

impl<'a> From<Attachment<'a>> for Message<'a>[src]

impl<'a, T> From<T> for Message<'a> where
    Cow<'a, str>: From<T>, 
[src]

impl<'a> Serialize for Message<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Message<'a>[src]

impl<'a> Send for Message<'a>[src]

impl<'a> Sync for Message<'a>[src]

impl<'a> Unpin for Message<'a>[src]

impl<'a> UnwindSafe for Message<'a>[src]

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> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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