MessageBuilder

Struct MessageBuilder 

Source
pub struct MessageBuilder { /* private fields */ }
Expand description

Builder for Message object.

Implementations§

Source§

impl MessageBuilder

Source

pub fn get_text(&self) -> Option<&String>

get text field value.

Source

pub fn set_text(self, value: Option<impl Into<String>>) -> Self

set text field value.

Source

pub fn text(self, value: impl Into<String>) -> Self

set text field value.

Source

pub fn get_blocks(&self) -> Option<&[Block]>

get blocks field value.

Source

pub fn set_blocks(self, value: Option<impl Into<Vec<Block>>>) -> Self

set blocks field value.

Source

pub fn blocks(self, value: impl Into<Vec<Block>>) -> Self

set blocks field value.

Source

pub fn block(self, value: impl Into<Block>) -> Self

push list element to blocks field.

Source

pub fn get_thread_ts(&self) -> Option<&String>

get thread_ts field value.

Source

pub fn set_thread_ts(self, value: Option<impl Into<String>>) -> Self

set thread_ts field value.

Source

pub fn thread_ts(self, value: impl Into<String>) -> Self

set thread_ts field value.

Source

pub fn get_mrkdwn(&self) -> Option<bool>

get mrkdwn field value.

Source

pub fn set_mrkdwn(self, value: Option<impl Into<bool>>) -> Self

set mrkdwn field value.

Source

pub fn mrkdwn(self, value: impl Into<bool>) -> Self

set mrkdwn field value.

Source

pub fn get_response_type(&self) -> Option<&String>

get response_type field value.

Source

pub fn set_response_type(self, value: Option<impl Into<String>>) -> Self

set response_type field value.

Source

pub fn response_type(self, value: impl Into<String>) -> Self

set response_type field value.

Source

pub fn get_replace_original(&self) -> Option<bool>

get replace_original field value.

Source

pub fn set_replace_original(self, value: Option<impl Into<bool>>) -> Self

set replace_original field value.

Source

pub fn replace_original(self, value: impl Into<bool>) -> Self

set replace_original field value.

Source

pub fn get_delete_original(&self) -> Option<bool>

get delete_original field value.

Source

pub fn set_delete_original(self, value: Option<impl Into<bool>>) -> Self

set delete_original field value.

Source

pub fn delete_original(self, value: impl Into<bool>) -> Self

set delete_original field value.

Source

pub fn get_reply_broadcast(&self) -> Option<bool>

get reply_broadcast field value.

Source

pub fn set_reply_broadcast(self, value: Option<impl Into<bool>>) -> Self

set reply_broadcast field value.

Source

pub fn reply_broadcast(self, value: impl Into<bool>) -> Self

set reply_broadcast field value.

Source

pub fn build(self) -> Result<Message, ValidationErrors>

build Message object.

Trait Implementations§

Source§

impl Debug for MessageBuilder

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for MessageBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.