Enum rustc_errors::DiagnosticArgValue
source · pub enum DiagnosticArgValue<'source> {
Str(Cow<'source, str>),
Number(usize),
StrListSepByAnd(Vec<Cow<'source, 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<'source> Clone for DiagnosticArgValue<'source>
impl<'source> Clone for DiagnosticArgValue<'source>
source§fn clone(&self) -> DiagnosticArgValue<'source>
fn clone(&self) -> DiagnosticArgValue<'source>
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<'source> Debug for DiagnosticArgValue<'source>
impl<'source> Debug for DiagnosticArgValue<'source>
source§impl<'source, __D: Decoder> Decodable<__D> for DiagnosticArgValue<'source>
impl<'source, __D: Decoder> Decodable<__D> for DiagnosticArgValue<'source>
source§impl<'source, __E: Encoder> Encodable<__E> for DiagnosticArgValue<'source>
impl<'source, __E: Encoder> Encodable<__E> for DiagnosticArgValue<'source>
source§impl<'source> Hash for DiagnosticArgValue<'source>
impl<'source> Hash for DiagnosticArgValue<'source>
source§impl<'source> Into<FluentValue<'source>> for DiagnosticArgValue<'source>
impl<'source> Into<FluentValue<'source>> for DiagnosticArgValue<'source>
source§impl<'source> IntoDiagnosticArg for DiagnosticArgValue<'source>
impl<'source> IntoDiagnosticArg for DiagnosticArgValue<'source>
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>
source§impl<'source> PartialEq<DiagnosticArgValue<'source>> for DiagnosticArgValue<'source>
impl<'source> PartialEq<DiagnosticArgValue<'source>> for DiagnosticArgValue<'source>
source§fn eq(&self, other: &DiagnosticArgValue<'source>) -> bool
fn eq(&self, other: &DiagnosticArgValue<'source>) -> bool
impl<'source> Eq for DiagnosticArgValue<'source>
impl<'source> StructuralEq for DiagnosticArgValue<'source>
impl<'source> StructuralPartialEq for DiagnosticArgValue<'source>
Auto Trait Implementations§
impl<'source> RefUnwindSafe for DiagnosticArgValue<'source>
impl<'source> Send for DiagnosticArgValue<'source>
impl<'source> Sync for DiagnosticArgValue<'source>
impl<'source> Unpin for DiagnosticArgValue<'source>
impl<'source> UnwindSafe for DiagnosticArgValue<'source>
Blanket Implementations§
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
: 32 bytesNumber
: 16 bytesStrListSepByAnd
: 32 bytes