Struct slack_morphism::SlackMessageContent
source · pub struct SlackMessageContent {
pub text: Option<String>,
pub blocks: Option<Vec<SlackBlock>>,
pub attachments: Option<Vec<SlackMessageAttachment>>,
pub upload: Option<bool>,
pub files: Option<Vec<SlackFile>>,
pub reactions: Option<Vec<SlackReaction>>,
}
Fields§
§text: Option<String>
§blocks: Option<Vec<SlackBlock>>
§attachments: Option<Vec<SlackMessageAttachment>>
§upload: Option<bool>
§files: Option<Vec<SlackFile>>
§reactions: Option<Vec<SlackReaction>>
Implementations§
source§impl SlackMessageContent
impl SlackMessageContent
pub fn new() -> Self
pub fn text(&mut self, value: String) -> &mut Self
pub fn reset_text(&mut self) -> &mut Self
pub fn mopt_text(&mut self, value: Option<String>) -> &mut Self
pub fn with_text(self, value: String) -> Self
pub fn without_text(self) -> Self
pub fn opt_text(self, value: Option<String>) -> Self
pub fn blocks(&mut self, value: Vec<SlackBlock>) -> &mut Self
pub fn reset_blocks(&mut self) -> &mut Self
pub fn mopt_blocks(&mut self, value: Option<Vec<SlackBlock>>) -> &mut Self
pub fn with_blocks(self, value: Vec<SlackBlock>) -> Self
pub fn without_blocks(self) -> Self
pub fn opt_blocks(self, value: Option<Vec<SlackBlock>>) -> Self
pub fn attachments(&mut self, value: Vec<SlackMessageAttachment>) -> &mut Self
pub fn reset_attachments(&mut self) -> &mut Self
pub fn mopt_attachments( &mut self, value: Option<Vec<SlackMessageAttachment>> ) -> &mut Self
pub fn with_attachments(self, value: Vec<SlackMessageAttachment>) -> Self
pub fn without_attachments(self) -> Self
pub fn opt_attachments(self, value: Option<Vec<SlackMessageAttachment>>) -> Self
pub fn upload(&mut self, value: bool) -> &mut Self
pub fn reset_upload(&mut self) -> &mut Self
pub fn mopt_upload(&mut self, value: Option<bool>) -> &mut Self
pub fn with_upload(self, value: bool) -> Self
pub fn without_upload(self) -> Self
pub fn opt_upload(self, value: Option<bool>) -> Self
pub fn files(&mut self, value: Vec<SlackFile>) -> &mut Self
pub fn reset_files(&mut self) -> &mut Self
pub fn mopt_files(&mut self, value: Option<Vec<SlackFile>>) -> &mut Self
pub fn with_files(self, value: Vec<SlackFile>) -> Self
pub fn without_files(self) -> Self
pub fn opt_files(self, value: Option<Vec<SlackFile>>) -> Self
pub fn reactions(&mut self, value: Vec<SlackReaction>) -> &mut Self
pub fn reset_reactions(&mut self) -> &mut Self
pub fn mopt_reactions(&mut self, value: Option<Vec<SlackReaction>>) -> &mut Self
pub fn with_reactions(self, value: Vec<SlackReaction>) -> Self
pub fn without_reactions(self) -> Self
pub fn opt_reactions(self, value: Option<Vec<SlackReaction>>) -> Self
Trait Implementations§
source§impl Clone for SlackMessageContent
impl Clone for SlackMessageContent
source§fn clone(&self) -> SlackMessageContent
fn clone(&self) -> SlackMessageContent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SlackMessageContent
impl Debug for SlackMessageContent
source§impl<'de> Deserialize<'de> for SlackMessageContent
impl<'de> Deserialize<'de> for SlackMessageContent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<SlackMessageContentInit> for SlackMessageContent
impl From<SlackMessageContentInit> for SlackMessageContent
source§fn from(value: SlackMessageContentInit) -> Self
fn from(value: SlackMessageContentInit) -> Self
Converts to this type from the input type.
source§impl PartialEq for SlackMessageContent
impl PartialEq for SlackMessageContent
source§fn eq(&self, other: &SlackMessageContent) -> bool
fn eq(&self, other: &SlackMessageContent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SlackMessageContent
impl Serialize for SlackMessageContent
impl StructuralPartialEq for SlackMessageContent
Auto Trait Implementations§
impl RefUnwindSafe for SlackMessageContent
impl Send for SlackMessageContent
impl Sync for SlackMessageContent
impl Unpin for SlackMessageContent
impl UnwindSafe for SlackMessageContent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more