pub struct SlackMarkdownBlock {
pub block_id: Option<SlackBlockId>,
pub text: String,
}Expand description
- https://api.slack.com/reference/block-kit/blocks#markdown
Fields§
§block_id: Option<SlackBlockId>§text: StringImplementations§
Source§impl SlackMarkdownBlock
impl SlackMarkdownBlock
Sourcepub fn new(text: String) -> Self
pub fn new(text: String) -> Self
Creates a new SlackMarkdownBlock 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.
Trait Implementations§
Source§impl Clone for SlackMarkdownBlock
impl Clone for SlackMarkdownBlock
Source§impl Debug for SlackMarkdownBlock
impl Debug for SlackMarkdownBlock
Source§impl<'de> Deserialize<'de> for SlackMarkdownBlock
impl<'de> Deserialize<'de> for SlackMarkdownBlock
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<SlackMarkdownBlock> for SlackBlock
impl From<SlackMarkdownBlock> for SlackBlock
Source§fn from(block: SlackMarkdownBlock) -> Self
fn from(block: SlackMarkdownBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackMarkdownBlockInit> for SlackMarkdownBlock
impl From<SlackMarkdownBlockInit> for SlackMarkdownBlock
Source§fn from(value: SlackMarkdownBlockInit) -> Self
fn from(value: SlackMarkdownBlockInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackMarkdownBlock
impl PartialEq for SlackMarkdownBlock
Source§impl Serialize for SlackMarkdownBlock
impl Serialize for SlackMarkdownBlock
impl StructuralPartialEq for SlackMarkdownBlock
Auto Trait Implementations§
impl Freeze for SlackMarkdownBlock
impl RefUnwindSafe for SlackMarkdownBlock
impl Send for SlackMarkdownBlock
impl Sync for SlackMarkdownBlock
impl Unpin for SlackMarkdownBlock
impl UnsafeUnpin for SlackMarkdownBlock
impl UnwindSafe for SlackMarkdownBlock
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