pub struct ContainerBlock {
pub title: TextObject,
pub rich_text_title: Option<RichTextBlock>,
pub subtitle: Option<TextObject>,
pub child_blocks: Vec<Block>,
pub block_id: Option<String>,
pub width: Option<ContainerWidth>,
pub icon: Option<ImageElement>,
pub is_collapsible: Option<bool>,
pub default_collapsed: Option<bool>,
pub has_header_divider: Option<bool>,
/* private fields */
}Expand description
A container that groups child blocks. https://docs.slack.dev/reference/block-kit/blocks/container-block
Fields§
§title: TextObject§rich_text_title: Option<RichTextBlock>§subtitle: Option<TextObject>§child_blocks: Vec<Block>§block_id: Option<String>§width: Option<ContainerWidth>§icon: Option<ImageElement>§is_collapsible: Option<bool>§default_collapsed: Option<bool>§has_header_divider: Option<bool>Implementations§
Source§impl ContainerBlock
impl ContainerBlock
pub fn new(title: impl Into<TextObject>, child_blocks: Vec<Block>) -> Self
pub fn rich_text_title(self, rich_text_title: RichTextBlock) -> Self
pub fn subtitle(self, subtitle: impl Into<TextObject>) -> Self
pub fn block_id(self, block_id: impl Into<String>) -> Self
pub fn width(self, width: ContainerWidth) -> Self
pub fn icon(self, icon: ImageElement) -> Self
pub fn is_collapsible(self, is_collapsible: bool) -> Self
pub fn default_collapsed(self, default_collapsed: bool) -> Self
pub fn has_header_divider(self, has_header_divider: bool) -> Self
Trait Implementations§
Source§impl Clone for ContainerBlock
impl Clone for ContainerBlock
Source§impl Debug for ContainerBlock
impl Debug for ContainerBlock
Source§impl<'de> Deserialize<'de> for ContainerBlock
impl<'de> Deserialize<'de> for ContainerBlock
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<ContainerBlock> for Block
impl From<ContainerBlock> for Block
Source§fn from(value: ContainerBlock) -> Self
fn from(value: ContainerBlock) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ContainerBlock
impl PartialEq for ContainerBlock
Source§impl Serialize for ContainerBlock
impl Serialize for ContainerBlock
impl StructuralPartialEq for ContainerBlock
Auto Trait Implementations§
impl Freeze for ContainerBlock
impl RefUnwindSafe for ContainerBlock
impl Send for ContainerBlock
impl Sync for ContainerBlock
impl Unpin for ContainerBlock
impl UnsafeUnpin for ContainerBlock
impl UnwindSafe for ContainerBlock
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