pub enum UiText {
Empty,
Text(SharedText),
Message(DeferredMessage),
}Expand description
UI text that can retain either literal content or a deferred translation. Deferred text resolves during composition and follows the nearest language provider.
Variants§
Empty
No text.
Text(SharedText)
Literal content, such as an external error or a user-provided document title.
Message(DeferredMessage)
A translation request whose arguments have already been captured.
Implementations§
Trait Implementations§
Source§impl From<DeferredMessage> for UiText
impl From<DeferredMessage> for UiText
Source§fn from(message: DeferredMessage) -> Self
fn from(message: DeferredMessage) -> Self
Converts to this type from the input type.
Source§fn from(text: SharedText) -> Self
fn from(text: SharedText) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for UiText
Auto Trait Implementations§
impl !RefUnwindSafe for UiText
impl !Send for UiText
impl !Sync for UiText
impl !UnwindSafe for UiText
impl Freeze for UiText
impl Unpin for UiText
impl UnsafeUnpin for UiText
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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