pub struct SlackHeaderBlock {
pub block_id: Option<SlackBlockId>,
pub text: SlackBlockPlainTextOnly,
pub level: Option<SlackHeaderLevel>,
}Fields§
§block_id: Option<SlackBlockId>§text: SlackBlockPlainTextOnly§level: Option<SlackHeaderLevel>1–4 = H1–H4; Slack renders the default size when absent. https://docs.slack.dev/reference/block-kit/blocks/header-block
Implementations§
Source§impl SlackHeaderBlock
impl SlackHeaderBlock
Sourcepub fn new(text: SlackBlockPlainTextOnly) -> Self
pub fn new(text: SlackBlockPlainTextOnly) -> Self
Creates a new SlackHeaderBlock 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: SlackBlockPlainTextOnly) -> &mut Self
pub fn text(&mut self, value: SlackBlockPlainTextOnly) -> &mut Self
Sets text to value.
Sourcepub fn with_text(self, value: SlackBlockPlainTextOnly) -> Self
pub fn with_text(self, value: SlackBlockPlainTextOnly) -> Self
Returns self with text set to value.
Sourcepub fn level(&mut self, value: SlackHeaderLevel) -> &mut Self
pub fn level(&mut self, value: SlackHeaderLevel) -> &mut Self
Sets level to Some(value).
1–4 = H1–H4; Slack renders the default size when absent. https://docs.slack.dev/reference/block-kit/blocks/header-block
Sourcepub fn reset_level(&mut self) -> &mut Self
pub fn reset_level(&mut self) -> &mut Self
Sets level to None.
1–4 = H1–H4; Slack renders the default size when absent. https://docs.slack.dev/reference/block-kit/blocks/header-block
Sourcepub fn mopt_level(&mut self, value: Option<SlackHeaderLevel>) -> &mut Self
pub fn mopt_level(&mut self, value: Option<SlackHeaderLevel>) -> &mut Self
Sets level to the given Option.
1–4 = H1–H4; Slack renders the default size when absent. https://docs.slack.dev/reference/block-kit/blocks/header-block
Sourcepub fn with_level(self, value: SlackHeaderLevel) -> Self
pub fn with_level(self, value: SlackHeaderLevel) -> Self
Returns self with level set to Some(value).
1–4 = H1–H4; Slack renders the default size when absent. https://docs.slack.dev/reference/block-kit/blocks/header-block
Sourcepub fn without_level(self) -> Self
pub fn without_level(self) -> Self
Returns self with level set to None.
1–4 = H1–H4; Slack renders the default size when absent. https://docs.slack.dev/reference/block-kit/blocks/header-block
Sourcepub fn opt_level(self, value: Option<SlackHeaderLevel>) -> Self
pub fn opt_level(self, value: Option<SlackHeaderLevel>) -> Self
Returns self with level set to the given Option.
1–4 = H1–H4; Slack renders the default size when absent. https://docs.slack.dev/reference/block-kit/blocks/header-block