pub trait LocalizationContext {
// Required methods
fn locale(&self) -> LanguageIdentifier;
fn localizations(&self) -> &Localizations;
fn invalidate_when_changed(&self, trackable: &impl Trackable);
}
Expand description
A context that is used while localizing values.
Required Methods§
Sourcefn localizations(&self) -> &Localizations
fn localizations(&self) -> &Localizations
Returns the localizations for this context.
Sourcefn invalidate_when_changed(&self, trackable: &impl Trackable)
fn invalidate_when_changed(&self, trackable: &impl Trackable)
Invalidates trackable
when changed.
Some values are localized outside of the context of a window being opened: for example, the Window’s title. In situations like these, invalidation is ignored.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.