pub struct SlackMessageAttachment {
pub id: Option<SlackMessageAttachmentId>,
pub color: Option<String>,
pub fallback: Option<String>,
pub title: Option<String>,
pub fields: Option<Vec<SlackMessageAttachmentFieldObject>>,
pub mrkdwn_in: Option<Vec<String>>,
pub text: Option<String>,
pub blocks: Option<Vec<SlackBlock>>,
}Fields§
§id: Option<SlackMessageAttachmentId>§color: Option<String>§fallback: Option<String>§title: Option<String>§fields: Option<Vec<SlackMessageAttachmentFieldObject>>§mrkdwn_in: Option<Vec<String>>§text: Option<String>§blocks: Option<Vec<SlackBlock>>Implementations§
Source§impl SlackMessageAttachment
impl SlackMessageAttachment
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SlackMessageAttachment from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn id(&mut self, value: SlackMessageAttachmentId) -> &mut Self
pub fn id(&mut self, value: SlackMessageAttachmentId) -> &mut Self
Sets id to Some(value).
Sourcepub fn mopt_id(&mut self, value: Option<SlackMessageAttachmentId>) -> &mut Self
pub fn mopt_id(&mut self, value: Option<SlackMessageAttachmentId>) -> &mut Self
Sets id to the given Option.
Sourcepub fn with_id(self, value: SlackMessageAttachmentId) -> Self
pub fn with_id(self, value: SlackMessageAttachmentId) -> Self
Returns self with id set to Some(value).
Sourcepub fn without_id(self) -> Self
pub fn without_id(self) -> Self
Returns self with id set to None.
Sourcepub fn opt_id(self, value: Option<SlackMessageAttachmentId>) -> Self
pub fn opt_id(self, value: Option<SlackMessageAttachmentId>) -> Self
Returns self with id set to the given Option.
Sourcepub fn reset_color(&mut self) -> &mut Self
pub fn reset_color(&mut self) -> &mut Self
Sets color to None.
Sourcepub fn mopt_color(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_color(&mut self, value: Option<String>) -> &mut Self
Sets color to the given Option.
Sourcepub fn with_color(self, value: String) -> Self
pub fn with_color(self, value: String) -> Self
Returns self with color set to Some(value).
Sourcepub fn without_color(self) -> Self
pub fn without_color(self) -> Self
Returns self with color set to None.
Sourcepub fn opt_color(self, value: Option<String>) -> Self
pub fn opt_color(self, value: Option<String>) -> Self
Returns self with color set to the given Option.
Sourcepub fn reset_fallback(&mut self) -> &mut Self
pub fn reset_fallback(&mut self) -> &mut Self
Sets fallback to None.
Sourcepub fn mopt_fallback(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_fallback(&mut self, value: Option<String>) -> &mut Self
Sets fallback to the given Option.
Sourcepub fn with_fallback(self, value: String) -> Self
pub fn with_fallback(self, value: String) -> Self
Returns self with fallback set to Some(value).
Sourcepub fn without_fallback(self) -> Self
pub fn without_fallback(self) -> Self
Returns self with fallback set to None.
Sourcepub fn opt_fallback(self, value: Option<String>) -> Self
pub fn opt_fallback(self, value: Option<String>) -> Self
Returns self with fallback set to the given Option.
Sourcepub fn reset_title(&mut self) -> &mut Self
pub fn reset_title(&mut self) -> &mut Self
Sets title to None.
Sourcepub fn mopt_title(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_title(&mut self, value: Option<String>) -> &mut Self
Sets title to the given Option.
Sourcepub fn with_title(self, value: String) -> Self
pub fn with_title(self, value: String) -> Self
Returns self with title set to Some(value).
Sourcepub fn without_title(self) -> Self
pub fn without_title(self) -> Self
Returns self with title set to None.
Sourcepub fn opt_title(self, value: Option<String>) -> Self
pub fn opt_title(self, value: Option<String>) -> Self
Returns self with title set to the given Option.
Sourcepub fn fields(
&mut self,
value: Vec<SlackMessageAttachmentFieldObject>,
) -> &mut Self
pub fn fields( &mut self, value: Vec<SlackMessageAttachmentFieldObject>, ) -> &mut Self
Sets fields to Some(value).
Sourcepub fn reset_fields(&mut self) -> &mut Self
pub fn reset_fields(&mut self) -> &mut Self
Sets fields to None.
Sourcepub fn mopt_fields(
&mut self,
value: Option<Vec<SlackMessageAttachmentFieldObject>>,
) -> &mut Self
pub fn mopt_fields( &mut self, value: Option<Vec<SlackMessageAttachmentFieldObject>>, ) -> &mut Self
Sets fields to the given Option.
Sourcepub fn with_fields(self, value: Vec<SlackMessageAttachmentFieldObject>) -> Self
pub fn with_fields(self, value: Vec<SlackMessageAttachmentFieldObject>) -> Self
Returns self with fields set to Some(value).
Sourcepub fn without_fields(self) -> Self
pub fn without_fields(self) -> Self
Returns self with fields set to None.
Sourcepub fn opt_fields(
self,
value: Option<Vec<SlackMessageAttachmentFieldObject>>,
) -> Self
pub fn opt_fields( self, value: Option<Vec<SlackMessageAttachmentFieldObject>>, ) -> Self
Returns self with fields set to the given Option.
Sourcepub fn reset_mrkdwn_in(&mut self) -> &mut Self
pub fn reset_mrkdwn_in(&mut self) -> &mut Self
Sets mrkdwn_in to None.
Sourcepub fn mopt_mrkdwn_in(&mut self, value: Option<Vec<String>>) -> &mut Self
pub fn mopt_mrkdwn_in(&mut self, value: Option<Vec<String>>) -> &mut Self
Sets mrkdwn_in to the given Option.
Sourcepub fn with_mrkdwn_in(self, value: Vec<String>) -> Self
pub fn with_mrkdwn_in(self, value: Vec<String>) -> Self
Returns self with mrkdwn_in set to Some(value).
Sourcepub fn without_mrkdwn_in(self) -> Self
pub fn without_mrkdwn_in(self) -> Self
Returns self with mrkdwn_in set to None.
Sourcepub fn opt_mrkdwn_in(self, value: Option<Vec<String>>) -> Self
pub fn opt_mrkdwn_in(self, value: Option<Vec<String>>) -> Self
Returns self with mrkdwn_in set to the given Option.
Sourcepub fn reset_text(&mut self) -> &mut Self
pub fn reset_text(&mut self) -> &mut Self
Sets text to None.
Sourcepub fn without_text(self) -> Self
pub fn without_text(self) -> Self
Returns self with text set to None.
Sourcepub fn opt_text(self, value: Option<String>) -> Self
pub fn opt_text(self, value: Option<String>) -> Self
Returns self with text set to the given Option.
Sourcepub fn blocks(&mut self, value: Vec<SlackBlock>) -> &mut Self
pub fn blocks(&mut self, value: Vec<SlackBlock>) -> &mut Self
Sets blocks to Some(value).
Sourcepub fn reset_blocks(&mut self) -> &mut Self
pub fn reset_blocks(&mut self) -> &mut Self
Sets blocks to None.
Sourcepub fn mopt_blocks(&mut self, value: Option<Vec<SlackBlock>>) -> &mut Self
pub fn mopt_blocks(&mut self, value: Option<Vec<SlackBlock>>) -> &mut Self
Sets blocks to the given Option.
Sourcepub fn with_blocks(self, value: Vec<SlackBlock>) -> Self
pub fn with_blocks(self, value: Vec<SlackBlock>) -> Self
Returns self with blocks set to Some(value).
Sourcepub fn without_blocks(self) -> Self
pub fn without_blocks(self) -> Self
Returns self with blocks set to None.
Sourcepub fn opt_blocks(self, value: Option<Vec<SlackBlock>>) -> Self
pub fn opt_blocks(self, value: Option<Vec<SlackBlock>>) -> Self
Returns self with blocks set to the given Option.