Struct slack_blocks::compose::opt_group::OptGroup [−][src]
Expand description
Option Group
Provides a way to group options in a select menu 🔗 or multi-select menu 🔗.
Implementations
This is supported on crate feature validation
only.
This is supported on crate feature
validation
only.Validate that this Option Group object agrees with Slack’s model requirements
Errors
- If
label
longer than 75 chars - If
opts
contains more than 100 options
Example
use std::iter::repeat; use slack_blocks::compose::{Opt, OptGroup}; let long_string: String = repeat(' ').take(76).collect(); let opt = Opt::builder().text_plain("San Diego") .value("ca_sd") .build(); let grp = OptGroup::builder().label(long_string).option(opt).build(); assert_eq!(true, matches!(grp.validate(), Err(_)));
Trait Implementations
impl<'a, Multi, Placeholder, ActionId> AppendOptOrOptGroup<'a, Multi, Placeholder, ActionId> for OptGroup<'a, Plain, NoUrl>
[src]
impl<'a, Multi, Placeholder, ActionId> AppendOptOrOptGroup<'a, Multi, Placeholder, ActionId> for OptGroup<'a, Plain, NoUrl>
[src]This is supported on crate feature
blox
only.type Output = StaticBuilder<'a, Multi, Placeholder, ActionId, Set<(options, StaticOptGroup<'a>)>>
type Output = StaticBuilder<'a, Multi, Placeholder, ActionId, Set<(options, StaticOptGroup<'a>)>>
The builder state after adding the opt / opt group
fn add_to(
self,
builder: StaticBuilder<'a, Multi, Placeholder, ActionId, RequiredMethodNotCalled<options>>
) -> Self::Output
[src]
fn add_to(
self,
builder: StaticBuilder<'a, Multi, Placeholder, ActionId, RequiredMethodNotCalled<options>>
) -> Self::Output
[src]Add this opt / opt group to the builder
impl<'de, 'a, T, U> Deserialize<'de> for OptGroup<'a, T, U> where
T: Deserialize<'de>,
U: Deserialize<'de>,
[src]
impl<'de, 'a, T, U> Deserialize<'de> for OptGroup<'a, T, U> where
T: Deserialize<'de>,
U: Deserialize<'de>,
[src]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, T, U> RefUnwindSafe for OptGroup<'a, T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<'a, T, U> UnwindSafe for OptGroup<'a, T, U> where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more