Struct slack_blocks::blocks::actions::Actions [−][src]
pub struct Actions<'a> { /* fields omitted */ }
Expand description
Implementations
Build a new Actions block.
For example, see docs for ActionsBuilder.
This is supported on crate feature validation
only.
This is supported on crate feature
validation
only.Validate that this Section block agrees with Slack’s model requirements
Errors
- If
block_id
longer than 255 chars - If
elements
contains more than 5 elements
Example
use slack_blocks::{blocks, compose, elems::Button}; let long_string = std::iter::repeat(' ').take(256).collect::<String>(); let block = blocks::Actions::builder().element(Button::builder().text("Click me") .action_id("btn") .build()) .block_id(long_string) .build(); assert!(matches!(block.validate(), Err(_)));
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
Auto Trait Implementations
impl<'a> RefUnwindSafe for Actions<'a>
impl<'a> UnwindSafe for Actions<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more