Enum slack_blocks::BlockElement [−][src]
pub enum BlockElement<'a> {}Show variants
Button(Button<'a>), Checkboxes(Checkboxes<'a>), Image(Image<'a>), DatePicker(DatePicker<'a>), Overflow(Overflow<'a>), RadioButtons(Radio<'a>), TextInput(TextInput<'a>), SelectPublicChannel(PublicChannel<'a>), SelectConversation(Conversation<'a>), SelectUser(User<'a>), SelectExternal(External<'a>), SelectStatic(Static<'a>), MultiSelectStatic(Static<'a>), MultiSelectUser(User<'a>), MultiSelectExternal(External<'a>), MultiSelectConversation(Conversation<'a>), MultiSelectPublicChannel(PublicChannel<'a>),
Expand description
Block Elements - interactive components
Block elements can be used inside of section
, context
, and actions
layout blocks 🔗.
Inputs can only be used inside of input
blocks.
Our overview of app surfaces that support Block Kit 🔗 shows you where those blocks might be relevant.
Finally, our handling user interactivity guide 🔗 will help you prepare your app to allow for the use of the interactive components listed below.
Variants
Button(Button<'a>)
Checkboxes(Checkboxes<'a>)
Image(Image<'a>)
DatePicker(DatePicker<'a>)
Overflow(Overflow<'a>)
RadioButtons(Radio<'a>)
TextInput(TextInput<'a>)
SelectPublicChannel(PublicChannel<'a>)
SelectConversation(Conversation<'a>)
SelectUser(User<'a>)
SelectExternal(External<'a>)
SelectStatic(Static<'a>)
MultiSelectStatic(Static<'a>)
MultiSelectUser(User<'a>)
MultiSelectExternal(External<'a>)
MultiSelectConversation(Conversation<'a>)
MultiSelectPublicChannel(PublicChannel<'a>)
Implementations
This is supported on crate feature validation
only.
validation
only.Validate that this block element agrees with Slack’s model requirements.
use slack_blocks::elems::{BlockElement, Button}; let text = std::iter::repeat('a').take(76).collect::<String>(); let btn = Button::builder().text(text).action_id("").build(); let elem = BlockElement::from(btn.clone()); assert_eq!(elem.validate(), btn.validate())
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type Error = UnsupportedElement<'a>
type Error = UnsupportedElement<'a>
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for BlockElement<'a>
impl<'a> Send for BlockElement<'a>
impl<'a> Sync for BlockElement<'a>
impl<'a> Unpin for BlockElement<'a>
impl<'a> UnwindSafe for BlockElement<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more