pub struct SlackCardBlock {
pub block_id: Option<SlackBlockId>,
pub title: Option<SlackBlockText>,
pub subtitle: Option<SlackBlockText>,
pub body: Option<SlackBlockText>,
pub hero_image: Option<SlackCardImageElement>,
pub icon: Option<SlackCardImageElement>,
pub actions: Option<Vec<SlackCardActionBlockElement>>,
}Fields§
§block_id: Option<SlackBlockId>§title: Option<SlackBlockText>§subtitle: Option<SlackBlockText>§body: Option<SlackBlockText>§hero_image: Option<SlackCardImageElement>§icon: Option<SlackCardImageElement>§actions: Option<Vec<SlackCardActionBlockElement>>Implementations§
Source§impl SlackCardBlock
impl SlackCardBlock
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SlackCardBlock from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn block_id(&mut self, value: SlackBlockId) -> &mut Self
pub fn block_id(&mut self, value: SlackBlockId) -> &mut Self
Sets block_id to Some(value).
Sourcepub fn reset_block_id(&mut self) -> &mut Self
pub fn reset_block_id(&mut self) -> &mut Self
Sets block_id to None.
Sourcepub fn mopt_block_id(&mut self, value: Option<SlackBlockId>) -> &mut Self
pub fn mopt_block_id(&mut self, value: Option<SlackBlockId>) -> &mut Self
Sets block_id to the given Option.
Sourcepub fn with_block_id(self, value: SlackBlockId) -> Self
pub fn with_block_id(self, value: SlackBlockId) -> Self
Returns self with block_id set to Some(value).
Sourcepub fn without_block_id(self) -> Self
pub fn without_block_id(self) -> Self
Returns self with block_id set to None.
Sourcepub fn opt_block_id(self, value: Option<SlackBlockId>) -> Self
pub fn opt_block_id(self, value: Option<SlackBlockId>) -> Self
Returns self with block_id set to the given Option.
Sourcepub fn title(&mut self, value: SlackBlockText) -> &mut Self
pub fn title(&mut self, value: SlackBlockText) -> &mut Self
Sets title to Some(value).
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<SlackBlockText>) -> &mut Self
pub fn mopt_title(&mut self, value: Option<SlackBlockText>) -> &mut Self
Sets title to the given Option.
Sourcepub fn with_title(self, value: SlackBlockText) -> Self
pub fn with_title(self, value: SlackBlockText) -> 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<SlackBlockText>) -> Self
pub fn opt_title(self, value: Option<SlackBlockText>) -> Self
Returns self with title set to the given Option.
Sourcepub fn subtitle(&mut self, value: SlackBlockText) -> &mut Self
pub fn subtitle(&mut self, value: SlackBlockText) -> &mut Self
Sets subtitle to Some(value).
Sourcepub fn reset_subtitle(&mut self) -> &mut Self
pub fn reset_subtitle(&mut self) -> &mut Self
Sets subtitle to None.
Sourcepub fn mopt_subtitle(&mut self, value: Option<SlackBlockText>) -> &mut Self
pub fn mopt_subtitle(&mut self, value: Option<SlackBlockText>) -> &mut Self
Sets subtitle to the given Option.
Sourcepub fn with_subtitle(self, value: SlackBlockText) -> Self
pub fn with_subtitle(self, value: SlackBlockText) -> Self
Returns self with subtitle set to Some(value).
Sourcepub fn without_subtitle(self) -> Self
pub fn without_subtitle(self) -> Self
Returns self with subtitle set to None.
Sourcepub fn opt_subtitle(self, value: Option<SlackBlockText>) -> Self
pub fn opt_subtitle(self, value: Option<SlackBlockText>) -> Self
Returns self with subtitle set to the given Option.
Sourcepub fn body(&mut self, value: SlackBlockText) -> &mut Self
pub fn body(&mut self, value: SlackBlockText) -> &mut Self
Sets body to Some(value).
Sourcepub fn reset_body(&mut self) -> &mut Self
pub fn reset_body(&mut self) -> &mut Self
Sets body to None.
Sourcepub fn mopt_body(&mut self, value: Option<SlackBlockText>) -> &mut Self
pub fn mopt_body(&mut self, value: Option<SlackBlockText>) -> &mut Self
Sets body to the given Option.
Sourcepub fn with_body(self, value: SlackBlockText) -> Self
pub fn with_body(self, value: SlackBlockText) -> Self
Returns self with body set to Some(value).
Sourcepub fn without_body(self) -> Self
pub fn without_body(self) -> Self
Returns self with body set to None.
Sourcepub fn opt_body(self, value: Option<SlackBlockText>) -> Self
pub fn opt_body(self, value: Option<SlackBlockText>) -> Self
Returns self with body set to the given Option.
Sourcepub fn hero_image(&mut self, value: SlackCardImageElement) -> &mut Self
pub fn hero_image(&mut self, value: SlackCardImageElement) -> &mut Self
Sets hero_image to Some(value).
Sourcepub fn reset_hero_image(&mut self) -> &mut Self
pub fn reset_hero_image(&mut self) -> &mut Self
Sets hero_image to None.
Sourcepub fn mopt_hero_image(
&mut self,
value: Option<SlackCardImageElement>,
) -> &mut Self
pub fn mopt_hero_image( &mut self, value: Option<SlackCardImageElement>, ) -> &mut Self
Sets hero_image to the given Option.
Sourcepub fn with_hero_image(self, value: SlackCardImageElement) -> Self
pub fn with_hero_image(self, value: SlackCardImageElement) -> Self
Returns self with hero_image set to Some(value).
Sourcepub fn without_hero_image(self) -> Self
pub fn without_hero_image(self) -> Self
Returns self with hero_image set to None.
Sourcepub fn opt_hero_image(self, value: Option<SlackCardImageElement>) -> Self
pub fn opt_hero_image(self, value: Option<SlackCardImageElement>) -> Self
Returns self with hero_image set to the given Option.
Sourcepub fn icon(&mut self, value: SlackCardImageElement) -> &mut Self
pub fn icon(&mut self, value: SlackCardImageElement) -> &mut Self
Sets icon to Some(value).
Sourcepub fn reset_icon(&mut self) -> &mut Self
pub fn reset_icon(&mut self) -> &mut Self
Sets icon to None.
Sourcepub fn mopt_icon(&mut self, value: Option<SlackCardImageElement>) -> &mut Self
pub fn mopt_icon(&mut self, value: Option<SlackCardImageElement>) -> &mut Self
Sets icon to the given Option.
Sourcepub fn with_icon(self, value: SlackCardImageElement) -> Self
pub fn with_icon(self, value: SlackCardImageElement) -> Self
Returns self with icon set to Some(value).
Sourcepub fn without_icon(self) -> Self
pub fn without_icon(self) -> Self
Returns self with icon set to None.
Sourcepub fn opt_icon(self, value: Option<SlackCardImageElement>) -> Self
pub fn opt_icon(self, value: Option<SlackCardImageElement>) -> Self
Returns self with icon set to the given Option.
Sourcepub fn actions(&mut self, value: Vec<SlackCardActionBlockElement>) -> &mut Self
pub fn actions(&mut self, value: Vec<SlackCardActionBlockElement>) -> &mut Self
Sets actions to Some(value).
Sourcepub fn reset_actions(&mut self) -> &mut Self
pub fn reset_actions(&mut self) -> &mut Self
Sets actions to None.
Sourcepub fn mopt_actions(
&mut self,
value: Option<Vec<SlackCardActionBlockElement>>,
) -> &mut Self
pub fn mopt_actions( &mut self, value: Option<Vec<SlackCardActionBlockElement>>, ) -> &mut Self
Sets actions to the given Option.
Sourcepub fn with_actions(self, value: Vec<SlackCardActionBlockElement>) -> Self
pub fn with_actions(self, value: Vec<SlackCardActionBlockElement>) -> Self
Returns self with actions set to Some(value).
Sourcepub fn without_actions(self) -> Self
pub fn without_actions(self) -> Self
Returns self with actions set to None.
Sourcepub fn opt_actions(
self,
value: Option<Vec<SlackCardActionBlockElement>>,
) -> Self
pub fn opt_actions( self, value: Option<Vec<SlackCardActionBlockElement>>, ) -> Self
Returns self with actions set to the given Option.