pub enum TextPart<'a> {
Literal(&'a str),
Int(i64),
Double(f64),
Str(&'a str),
}Expand description
One piece of an interpolated Text.
Variants§
Literal(&'a str)
Literal text, kept as a literal segment of the key.
Int(i64)
A value interpolated with %lld, the specifier Swift uses for Int.
Double(f64)
A value interpolated with %lf, Swift’s specifier for Double.
Str(&'a str)
A string, through the overload that takes one whole.
Not a specifier: appendInterpolation(_ string: String) is its own
method, and the value goes in as text rather than as a placeholder a
translation could reorder.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TextPart<'a>
impl<'a> RefUnwindSafe for TextPart<'a>
impl<'a> Send for TextPart<'a>
impl<'a> Sync for TextPart<'a>
impl<'a> Unpin for TextPart<'a>
impl<'a> UnsafeUnpin for TextPart<'a>
impl<'a> UnwindSafe for TextPart<'a>
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