#[non_exhaustive]pub struct GroupOption {
pub value: CompactString,
pub label: CompactString,
pub description: Option<CompactString>,
pub default: bool,
}Expand description
An option of a RadioGroup or CheckboxGroup (the docs define two identical
structures).
discord.js counterpart: APIRadioGroupOption / APICheckboxGroupOption (discord-api-types).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.value: CompactStringThe developer-defined value (max 100 characters).
label: CompactStringThe text shown to the user (max 100 characters).
description: Option<CompactString>An additional description (max 100 characters).
default: boolWhether the option is selected by default.
Implementations§
Trait Implementations§
Source§impl Clone for GroupOption
impl Clone for GroupOption
Source§impl Debug for GroupOption
impl Debug for GroupOption
Source§impl<'de> Deserialize<'de> for GroupOption
impl<'de> Deserialize<'de> for GroupOption
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
impl Eq for GroupOption
Source§impl From<SelectOption> for GroupOption
impl From<SelectOption> for GroupOption
Source§fn from(option: SelectOption) -> Self
fn from(option: SelectOption) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GroupOption
impl PartialEq for GroupOption
Source§impl Serialize for GroupOption
impl Serialize for GroupOption
impl StructuralPartialEq for GroupOption
Auto Trait Implementations§
impl Freeze for GroupOption
impl RefUnwindSafe for GroupOption
impl Send for GroupOption
impl Sync for GroupOption
impl Unpin for GroupOption
impl UnsafeUnpin for GroupOption
impl UnwindSafe for GroupOption
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