#[non_exhaustive]pub struct OptionInfo<'a> {
pub name: &'a str,
pub name_localizations: &'a BTreeMap<Locale, CompactString>,
pub description: &'a str,
pub description_localizations: &'a BTreeMap<Locale, CompactString>,
pub name_localized: Option<&'a str>,
pub description_localized: Option<&'a str>,
}Expand description
The fields every CommandOption has, as returned by CommandOption::common.
discord.js counterpart: none (a borrowed view of the fields every APIApplicationCommandOption has).
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.name: &'a strThe option’s name.
name_localizations: &'a BTreeMap<Locale, CompactString>Translations of the name.
description: &'a strThe option’s description.
description_localizations: &'a BTreeMap<Locale, CompactString>Translations of the description.
name_localized: Option<&'a str>The name in the requester’s locale, if Discord sent it.
description_localized: Option<&'a str>The description in the requester’s locale, if Discord sent it.
Trait Implementations§
Source§impl<'a> Clone for OptionInfo<'a>
impl<'a> Clone for OptionInfo<'a>
impl<'a> Copy for OptionInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for OptionInfo<'a>
impl<'a> RefUnwindSafe for OptionInfo<'a>
impl<'a> Send for OptionInfo<'a>
impl<'a> Sync for OptionInfo<'a>
impl<'a> Unpin for OptionInfo<'a>
impl<'a> UnsafeUnpin for OptionInfo<'a>
impl<'a> UnwindSafe for OptionInfo<'a>
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