pub enum SlackBlock {
Show 24 variants
Section(SlackSectionBlock),
Header(SlackHeaderBlock),
Divider(SlackDividerBlock),
Image(SlackImageBlock),
Actions(SlackActionsBlock),
Context(SlackContextBlock),
Input(SlackInputBlock),
File(SlackFileBlock),
Video(SlackVideoBlock),
Markdown(SlackMarkdownBlock),
RichText(SlackRichTextBlock),
Table(SlackTableBlock),
TaskCard(SlackTaskCardBlock),
Alert(SlackAlertBlock),
Card(SlackCardBlock),
Carousel(SlackCarouselBlock),
ContextActions(SlackContextActionsBlock),
Container(SlackContainerBlock),
Plan(SlackPlanBlock),
DataTable(SlackDataTableBlock),
DataVisualization(SlackDataVisualizationBlock),
ShareShortcut(Value),
Event(Value),
Unknown(Value),
}Expand description
Blocks are internally tagged by type. A block whose type the crate does
not model — or whose body does not match its known type — lands in
SlackBlock::Unknown with its raw JSON instead of failing the whole
Vec<SlackBlock>. Unknown must stay the last variant.
Variants§
Section(SlackSectionBlock)
Header(SlackHeaderBlock)
Divider(SlackDividerBlock)
Image(SlackImageBlock)
Actions(SlackActionsBlock)
Context(SlackContextBlock)
Input(SlackInputBlock)
File(SlackFileBlock)
Video(SlackVideoBlock)
Markdown(SlackMarkdownBlock)
RichText(SlackRichTextBlock)
Table(SlackTableBlock)
TaskCard(SlackTaskCardBlock)
Alert(SlackAlertBlock)
Card(SlackCardBlock)
Carousel(SlackCarouselBlock)
ContextActions(SlackContextActionsBlock)
Container(SlackContainerBlock)
Plan(SlackPlanBlock)
DataTable(SlackDataTableBlock)
DataVisualization(SlackDataVisualizationBlock)
Event(Value)
Unknown(Value)
Trait Implementations§
Source§impl Clone for SlackBlock
impl Clone for SlackBlock
Source§impl Debug for SlackBlock
impl Debug for SlackBlock
Source§impl<'de> Deserialize<'de> for SlackBlock
impl<'de> Deserialize<'de> for SlackBlock
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<SlackActionsBlock> for SlackBlock
impl From<SlackActionsBlock> for SlackBlock
Source§fn from(block: SlackActionsBlock) -> Self
fn from(block: SlackActionsBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackAlertBlock> for SlackBlock
impl From<SlackAlertBlock> for SlackBlock
Source§fn from(block: SlackAlertBlock) -> Self
fn from(block: SlackAlertBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackCardBlock> for SlackBlock
impl From<SlackCardBlock> for SlackBlock
Source§fn from(block: SlackCardBlock) -> Self
fn from(block: SlackCardBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackCarouselBlock> for SlackBlock
impl From<SlackCarouselBlock> for SlackBlock
Source§fn from(block: SlackCarouselBlock) -> Self
fn from(block: SlackCarouselBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackContainerBlock> for SlackBlock
impl From<SlackContainerBlock> for SlackBlock
Source§fn from(block: SlackContainerBlock) -> Self
fn from(block: SlackContainerBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackContextActionsBlock> for SlackBlock
impl From<SlackContextActionsBlock> for SlackBlock
Source§fn from(block: SlackContextActionsBlock) -> Self
fn from(block: SlackContextActionsBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackContextBlock> for SlackBlock
impl From<SlackContextBlock> for SlackBlock
Source§fn from(block: SlackContextBlock) -> Self
fn from(block: SlackContextBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackDataTableBlock> for SlackBlock
impl From<SlackDataTableBlock> for SlackBlock
Source§fn from(block: SlackDataTableBlock) -> Self
fn from(block: SlackDataTableBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackDataVisualizationBlock> for SlackBlock
impl From<SlackDataVisualizationBlock> for SlackBlock
Source§fn from(block: SlackDataVisualizationBlock) -> Self
fn from(block: SlackDataVisualizationBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackDividerBlock> for SlackBlock
impl From<SlackDividerBlock> for SlackBlock
Source§fn from(block: SlackDividerBlock) -> Self
fn from(block: SlackDividerBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackFileBlock> for SlackBlock
impl From<SlackFileBlock> for SlackBlock
Source§fn from(block: SlackFileBlock) -> Self
fn from(block: SlackFileBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackHeaderBlock> for SlackBlock
impl From<SlackHeaderBlock> for SlackBlock
Source§fn from(block: SlackHeaderBlock) -> Self
fn from(block: SlackHeaderBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackImageBlock> for SlackBlock
impl From<SlackImageBlock> for SlackBlock
Source§fn from(block: SlackImageBlock) -> Self
fn from(block: SlackImageBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackInputBlock> for SlackBlock
impl From<SlackInputBlock> for SlackBlock
Source§fn from(block: SlackInputBlock) -> Self
fn from(block: SlackInputBlock) -> Self
Converts to this type from the input type.
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<SlackPlanBlock> for SlackBlock
impl From<SlackPlanBlock> for SlackBlock
Source§fn from(block: SlackPlanBlock) -> Self
fn from(block: SlackPlanBlock) -> Self
Converts to this type from the input type.
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<SlackSectionBlock> for SlackBlock
impl From<SlackSectionBlock> for SlackBlock
Source§fn from(block: SlackSectionBlock) -> Self
fn from(block: SlackSectionBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackTableBlock> for SlackBlock
impl From<SlackTableBlock> for SlackBlock
Source§fn from(block: SlackTableBlock) -> Self
fn from(block: SlackTableBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackTaskCardBlock> for SlackBlock
impl From<SlackTaskCardBlock> for SlackBlock
Source§fn from(block: SlackTaskCardBlock) -> Self
fn from(block: SlackTaskCardBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackVideoBlock> for SlackBlock
impl From<SlackVideoBlock> for SlackBlock
Source§fn from(block: SlackVideoBlock) -> Self
fn from(block: SlackVideoBlock) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackBlock
impl PartialEq for SlackBlock
Source§impl Serialize for SlackBlock
impl Serialize for SlackBlock
impl StructuralPartialEq for SlackBlock
Auto Trait Implementations§
impl Freeze for SlackBlock
impl RefUnwindSafe for SlackBlock
impl Send for SlackBlock
impl Sync for SlackBlock
impl Unpin for SlackBlock
impl UnsafeUnpin for SlackBlock
impl UnwindSafe for SlackBlock
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