pub struct EVENTS_L10N;
Expand description
EVENTS L10N integration.
Implementations§
source§impl EVENTS_L10N
impl EVENTS_L10N
sourcepub fn init_l10n(
&self,
localize: impl Fn([&'static str; 3], Command, &'static str, CommandMetaVar<Txt>) + Send + Sync + 'static,
)
pub fn init_l10n( &self, localize: impl Fn([&'static str; 3], Command, &'static str, CommandMetaVar<Txt>) + Send + Sync + 'static, )
Register a closure that is called to localize command metadata.
The closure arguments are:
file
is the crate package name, version and the file from command declaration@l10n: "file"
value or is empty if@l10n
was set to something else.cmd
is the command, the command event name should be used as key.meta
is the metadata name, for example"name"
, should be used as attribute.txt
is text variable that must be set with the translation.
Auto Trait Implementations§
impl Freeze for EVENTS_L10N
impl RefUnwindSafe for EVENTS_L10N
impl Send for EVENTS_L10N
impl Sync for EVENTS_L10N
impl Unpin for EVENTS_L10N
impl UnwindSafe for EVENTS_L10N
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more