pub enum DiagnosticArgValue {
Str(Cow<'static, str>),
Number(i128),
StrListSepByAnd(Vec<Cow<'static, str>>),
}
Expand description
Simplified version of FluentValue
that can implement Encodable
and Decodable
. Converted
to a FluentValue
by the emitter to be used in diagnostic translation.
Variants§
Trait Implementations§
source§impl Clone for DiagnosticArgValue
impl Clone for DiagnosticArgValue
source§fn clone(&self) -> DiagnosticArgValue
fn clone(&self) -> DiagnosticArgValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DiagnosticArgValue
impl Debug for DiagnosticArgValue
source§impl<__D: SpanDecoder> Decodable<__D> for DiagnosticArgValue
impl<__D: SpanDecoder> Decodable<__D> for DiagnosticArgValue
source§impl<__E: SpanEncoder> Encodable<__E> for DiagnosticArgValue
impl<__E: SpanEncoder> Encodable<__E> for DiagnosticArgValue
source§impl Hash for DiagnosticArgValue
impl Hash for DiagnosticArgValue
source§impl Into<FluentValue<'static>> for DiagnosticArgValue
impl Into<FluentValue<'static>> for DiagnosticArgValue
source§impl IntoDiagnosticArg for DiagnosticArgValue
impl IntoDiagnosticArg for DiagnosticArgValue
fn into_diagnostic_arg(self) -> DiagnosticArgValue
source§impl PartialEq for DiagnosticArgValue
impl PartialEq for DiagnosticArgValue
source§fn eq(&self, other: &DiagnosticArgValue) -> bool
fn eq(&self, other: &DiagnosticArgValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DiagnosticArgValue
impl StructuralPartialEq for DiagnosticArgValue
Auto Trait Implementations§
impl RefUnwindSafe for DiagnosticArgValue
impl Send for DiagnosticArgValue
impl Sync for DiagnosticArgValue
impl Unpin for DiagnosticArgValue
impl UnwindSafe for DiagnosticArgValue
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Str
: 24 bytesNumber
: 24 bytesStrListSepByAnd
: 24 bytes