pub struct DescLocalizations { /* private fields */ }Expand description
Localization data for command descriptions.
This type is used in the desc_localizations attribute of the
CreateCommand trait. See the module documentation for
more information.
Implementations§
Source§impl DescLocalizations
impl DescLocalizations
Sourcepub fn new(
fallback: impl Into<String>,
localizations: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Self
pub fn new( fallback: impl Into<String>, localizations: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Self
Create a new DescLocalizations.
The localizations must be a tuple where the first element is a valid Discord locale and the second element is the localized value.
See Localization on Discord Developer Docs for more information.
Trait Implementations§
Source§impl Clone for DescLocalizations
impl Clone for DescLocalizations
Source§fn clone(&self) -> DescLocalizations
fn clone(&self) -> DescLocalizations
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DescLocalizations
impl Debug for DescLocalizations
Source§impl PartialEq for DescLocalizations
impl PartialEq for DescLocalizations
impl StructuralPartialEq for DescLocalizations
Auto Trait Implementations§
impl Freeze for DescLocalizations
impl RefUnwindSafe for DescLocalizations
impl Send for DescLocalizations
impl Sync for DescLocalizations
impl Unpin for DescLocalizations
impl UnwindSafe for DescLocalizations
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