pub struct NameLocalizations { /* private fields */ }Expand description
Localization data for command names.
This type is used in the name_localizations attribute of the
CreateCommand and CreateOption traits. See the module
documentation for more information.
Implementations§
Source§impl NameLocalizations
impl NameLocalizations
Sourcepub fn new(
localizations: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Self
pub fn new( localizations: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Self
Create a new NameLocalizations.
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 NameLocalizations
impl Clone for NameLocalizations
Source§fn clone(&self) -> NameLocalizations
fn clone(&self) -> NameLocalizations
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 NameLocalizations
impl Debug for NameLocalizations
Source§impl PartialEq for NameLocalizations
impl PartialEq for NameLocalizations
impl StructuralPartialEq for NameLocalizations
Auto Trait Implementations§
impl Freeze for NameLocalizations
impl RefUnwindSafe for NameLocalizations
impl Send for NameLocalizations
impl Sync for NameLocalizations
impl Unpin for NameLocalizations
impl UnwindSafe for NameLocalizations
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