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:
fileis the crate package name, version and the file from command declaration@l10n: "file"value or is empty if@l10nwas set to something else.cmdis the command, the command event name should be used as key.metais the metadata name, for example"name", should be used as attribute.txtis 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