pub enum DiagnosticArg {
Type(TypeId),
Symbol(SymbolId),
Atom(Atom),
String(Arc<str>),
Number(usize),
}Expand description
Argument for a diagnostic message template.
Instead of eagerly formatting types to strings, we store the raw data
(TypeId, SymbolId, etc.) and only format when rendering.
Variants§
Type(TypeId)
A type reference (will be formatted via TypeFormatter)
Symbol(SymbolId)
A symbol reference (will be looked up by name)
Atom(Atom)
An interned string
String(Arc<str>)
A plain string
Number(usize)
A number
Trait Implementations§
Source§impl Clone for DiagnosticArg
impl Clone for DiagnosticArg
Source§fn clone(&self) -> DiagnosticArg
fn clone(&self) -> DiagnosticArg
Returns a duplicate 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 DiagnosticArg
impl Debug for DiagnosticArg
Source§impl From<&str> for DiagnosticArg
impl From<&str> for DiagnosticArg
Source§impl From<Atom> for DiagnosticArg
impl From<Atom> for DiagnosticArg
Source§impl From<String> for DiagnosticArg
impl From<String> for DiagnosticArg
Source§impl From<SymbolId> for DiagnosticArg
impl From<SymbolId> for DiagnosticArg
Source§impl From<TypeId> for DiagnosticArg
impl From<TypeId> for DiagnosticArg
Auto Trait Implementations§
impl Freeze for DiagnosticArg
impl RefUnwindSafe for DiagnosticArg
impl Send for DiagnosticArg
impl Sync for DiagnosticArg
impl Unpin for DiagnosticArg
impl UnsafeUnpin for DiagnosticArg
impl UnwindSafe for DiagnosticArg
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