pub struct Argument<'a> { /* private fields */ }Expand description
A named value passed to a message without allocating a string for numbers.
Implementations§
Source§impl<'a> Argument<'a>
impl<'a> Argument<'a>
Sourcepub fn new(name: &'static str, value: impl Into<FluentValue<'a>>) -> Self
pub fn new(name: &'static str, value: impl Into<FluentValue<'a>>) -> Self
Borrows strings and preserves numeric values for Fluent plural selection.
Sourcepub fn take_owned(&mut self) -> Argument<'static>
pub fn take_owned(&mut self) -> Argument<'static>
Transfers owned values into a cache, copying only borrowed text that must outlive the call.
Sourcepub fn update_from(&mut self, source: &mut Argument<'_>)
pub fn update_from(&mut self, source: &mut Argument<'_>)
Updates an owned cache argument, reusing string storage when possible.
Trait Implementations§
impl<'a> StructuralPartialEq for Argument<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Argument<'a>
impl<'a> !Sync for Argument<'a>
impl<'a> !UnwindSafe for Argument<'a>
impl<'a> Freeze for Argument<'a>
impl<'a> Send for Argument<'a>
impl<'a> Unpin for Argument<'a>
impl<'a> UnsafeUnpin for Argument<'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