pub struct SectionBlock {
pub text: Option<TextObject>,
pub block_id: Option<String>,
pub fields: Vec<TextObject>,
pub accessory: Option<SectionAccessory>,
pub expand: Option<bool>,
/* private fields */
}Expand description
The basic block for text, optionally alongside an element. https://docs.slack.dev/reference/block-kit/blocks/section-block
Fields§
§text: Option<TextObject>§block_id: Option<String>§fields: Vec<TextObject>§accessory: Option<SectionAccessory>§expand: Option<bool>Implementations§
Source§impl SectionBlock
impl SectionBlock
pub fn new() -> Self
pub fn text(self, text: impl Into<TextObject>) -> Self
pub fn block_id(self, block_id: impl Into<String>) -> Self
pub fn fields(self, fields: Vec<TextObject>) -> Self
pub fn accessory(self, accessory: impl Into<SectionAccessory>) -> Self
pub fn expand(self, expand: bool) -> Self
Trait Implementations§
Source§impl Clone for SectionBlock
impl Clone for SectionBlock
Source§impl Debug for SectionBlock
impl Debug for SectionBlock
Source§impl Default for SectionBlock
impl Default for SectionBlock
Source§impl<'de> Deserialize<'de> for SectionBlock
impl<'de> Deserialize<'de> for SectionBlock
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<SectionBlock> for Block
impl From<SectionBlock> for Block
Source§fn from(value: SectionBlock) -> Self
fn from(value: SectionBlock) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SectionBlock
impl PartialEq for SectionBlock
Source§impl Serialize for SectionBlock
impl Serialize for SectionBlock
impl StructuralPartialEq for SectionBlock
Auto Trait Implementations§
impl Freeze for SectionBlock
impl RefUnwindSafe for SectionBlock
impl Send for SectionBlock
impl Sync for SectionBlock
impl Unpin for SectionBlock
impl UnsafeUnpin for SectionBlock
impl UnwindSafe for SectionBlock
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