pub struct SlackRichTextBlock {
pub block_id: Option<SlackBlockId>,
pub elements: Vec<SlackRichTextElement>,
}Expand description
- https://api.slack.com/reference/block-kit/blocks#rich_text
Fields§
§block_id: Option<SlackBlockId>§elements: Vec<SlackRichTextElement>Implementations§
Source§impl SlackRichTextBlock
impl SlackRichTextBlock
Sourcepub fn new(elements: Vec<SlackRichTextElement>) -> Self
pub fn new(elements: Vec<SlackRichTextElement>) -> Self
Creates a new SlackRichTextBlock 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 elements(&mut self, value: Vec<SlackRichTextElement>) -> &mut Self
pub fn elements(&mut self, value: Vec<SlackRichTextElement>) -> &mut Self
Sets elements to value.
Sourcepub fn with_elements(self, value: Vec<SlackRichTextElement>) -> Self
pub fn with_elements(self, value: Vec<SlackRichTextElement>) -> Self
Returns self with elements set to value.
Trait Implementations§
Source§impl Clone for SlackRichTextBlock
impl Clone for SlackRichTextBlock
Source§impl Debug for SlackRichTextBlock
impl Debug for SlackRichTextBlock
Source§impl<'de> Deserialize<'de> for SlackRichTextBlock
impl<'de> Deserialize<'de> for SlackRichTextBlock
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<SlackRichTextBlock> for SlackBlock
impl From<SlackRichTextBlock> for SlackBlock
Source§fn from(block: SlackRichTextBlock) -> Self
fn from(block: SlackRichTextBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackRichTextBlock> for SlackRichTextInlineContent
impl From<SlackRichTextBlock> for SlackRichTextInlineContent
Source§fn from(block: SlackRichTextBlock) -> Self
fn from(block: SlackRichTextBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackRichTextBlockInit> for SlackRichTextBlock
impl From<SlackRichTextBlockInit> for SlackRichTextBlock
Source§fn from(value: SlackRichTextBlockInit) -> Self
fn from(value: SlackRichTextBlockInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackRichTextBlock
impl PartialEq for SlackRichTextBlock
Source§impl Serialize for SlackRichTextBlock
impl Serialize for SlackRichTextBlock
impl StructuralPartialEq for SlackRichTextBlock
Auto Trait Implementations§
impl Freeze for SlackRichTextBlock
impl RefUnwindSafe for SlackRichTextBlock
impl Send for SlackRichTextBlock
impl Sync for SlackRichTextBlock
impl Unpin for SlackRichTextBlock
impl UnsafeUnpin for SlackRichTextBlock
impl UnwindSafe for SlackRichTextBlock
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