pub struct SlackSectionBlock {
pub block_id: Option<SlackBlockId>,
pub text: Option<SlackBlockText>,
pub fields: Option<Vec<SlackBlockText>>,
pub accessory: Option<SlackSectionBlockElement>,
pub expand: Option<bool>,
}Fields§
§block_id: Option<SlackBlockId>§text: Option<SlackBlockText>§fields: Option<Vec<SlackBlockText>>§accessory: Option<SlackSectionBlockElement>§expand: Option<bool>Implementations§
Source§impl SlackSectionBlock
impl SlackSectionBlock
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SlackSectionBlock 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 text(&mut self, value: SlackBlockText) -> &mut Self
pub fn text(&mut self, value: SlackBlockText) -> &mut Self
Sets text to Some(value).
Sourcepub fn reset_text(&mut self) -> &mut Self
pub fn reset_text(&mut self) -> &mut Self
Sets text to None.
Sourcepub fn mopt_text(&mut self, value: Option<SlackBlockText>) -> &mut Self
pub fn mopt_text(&mut self, value: Option<SlackBlockText>) -> &mut Self
Sets text to the given Option.
Sourcepub fn with_text(self, value: SlackBlockText) -> Self
pub fn with_text(self, value: SlackBlockText) -> Self
Returns self with text set to Some(value).
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<SlackBlockText>) -> Self
pub fn opt_text(self, value: Option<SlackBlockText>) -> Self
Returns self with text set to the given Option.
Sourcepub fn fields(&mut self, value: Vec<SlackBlockText>) -> &mut Self
pub fn fields(&mut self, value: Vec<SlackBlockText>) -> &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<SlackBlockText>>) -> &mut Self
pub fn mopt_fields(&mut self, value: Option<Vec<SlackBlockText>>) -> &mut Self
Sets fields to the given Option.
Sourcepub fn with_fields(self, value: Vec<SlackBlockText>) -> Self
pub fn with_fields(self, value: Vec<SlackBlockText>) -> 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<SlackBlockText>>) -> Self
pub fn opt_fields(self, value: Option<Vec<SlackBlockText>>) -> Self
Returns self with fields set to the given Option.
Sourcepub fn accessory(&mut self, value: SlackSectionBlockElement) -> &mut Self
pub fn accessory(&mut self, value: SlackSectionBlockElement) -> &mut Self
Sets accessory to Some(value).
Sourcepub fn reset_accessory(&mut self) -> &mut Self
pub fn reset_accessory(&mut self) -> &mut Self
Sets accessory to None.
Sourcepub fn mopt_accessory(
&mut self,
value: Option<SlackSectionBlockElement>,
) -> &mut Self
pub fn mopt_accessory( &mut self, value: Option<SlackSectionBlockElement>, ) -> &mut Self
Sets accessory to the given Option.
Sourcepub fn with_accessory(self, value: SlackSectionBlockElement) -> Self
pub fn with_accessory(self, value: SlackSectionBlockElement) -> Self
Returns self with accessory set to Some(value).
Sourcepub fn without_accessory(self) -> Self
pub fn without_accessory(self) -> Self
Returns self with accessory set to None.
Sourcepub fn opt_accessory(self, value: Option<SlackSectionBlockElement>) -> Self
pub fn opt_accessory(self, value: Option<SlackSectionBlockElement>) -> Self
Returns self with accessory set to the given Option.
Sourcepub fn reset_expand(&mut self) -> &mut Self
pub fn reset_expand(&mut self) -> &mut Self
Sets expand to None.
Sourcepub fn mopt_expand(&mut self, value: Option<bool>) -> &mut Self
pub fn mopt_expand(&mut self, value: Option<bool>) -> &mut Self
Sets expand to the given Option.
Sourcepub fn with_expand(self, value: bool) -> Self
pub fn with_expand(self, value: bool) -> Self
Returns self with expand set to Some(value).
Sourcepub fn without_expand(self) -> Self
pub fn without_expand(self) -> Self
Returns self with expand set to None.
Sourcepub fn opt_expand(self, value: Option<bool>) -> Self
pub fn opt_expand(self, value: Option<bool>) -> Self
Returns self with expand set to the given Option.