pub struct LocaleSwitch<'w> { /* private fields */ }Expand description
What a locale switch writes: the app’s own i18n handle, and the base writing direction the new locale reads in.
Both are optional because not every world carries them. A bare world, or
a host that installed no i18n, leaves a set_locale with nothing to
switch, and it is dropped.
Trait Implementations§
Source§impl SystemParam for LocaleSwitch<'_>
impl SystemParam for LocaleSwitch<'_>
Source§type Item<'w, 's> = LocaleSwitch<'w>
type Item<'w, 's> = LocaleSwitch<'w>
The item type returned when constructing this system param.
The value of this associated type should be
Self, instantiated with new lifetimes. Read moreSource§fn init_state(world: &mut World) -> Self::State
fn init_state(world: &mut World) -> Self::State
Creates a new instance of this param’s
State.Source§fn init_access(
state: &Self::State,
system_meta: &mut SystemMeta,
component_access_set: &mut FilteredAccessSet,
world: &mut World,
)
fn init_access( state: &Self::State, system_meta: &mut SystemMeta, component_access_set: &mut FilteredAccessSet, world: &mut World, )
Source§fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)
fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)
Applies any deferred mutations stored in this [
SystemParam]’s state.
This is used to apply Commands during ApplyDeferred.Source§fn queue(
state: &mut Self::State,
system_meta: &SystemMeta,
world: DeferredWorld<'_>,
)
fn queue( state: &mut Self::State, system_meta: &SystemMeta, world: DeferredWorld<'_>, )
Queues any deferred mutations to be applied at the next
ApplyDeferred.impl<'w, 's> ReadOnlySystemParam for LocaleSwitch<'w>where
Option<ResMut<'w, AppI18n>>: ReadOnlySystemParam,
Option<ResMut<'w, DefaultLayoutDirection>>: ReadOnlySystemParam,
Auto Trait Implementations§
impl<'w> Freeze for LocaleSwitch<'w>
impl<'w> !RefUnwindSafe for LocaleSwitch<'w>
impl<'w> Send for LocaleSwitch<'w>
impl<'w> Sync for LocaleSwitch<'w>
impl<'w> Unpin for LocaleSwitch<'w>
impl<'w> UnsafeUnpin for LocaleSwitch<'w>
impl<'w> !UnwindSafe for LocaleSwitch<'w>
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>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.