Enum rustc_errors::DiagnosticArgValue
source · pub enum DiagnosticArgValue<'source> {
Str(Cow<'source, str>),
Number(i128),
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
This method tests for
self
and other
values to be equal, and is used
by ==
.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§
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