pub enum Code {
Custom {
code: String,
severity: Severity,
},
}Expand description
Stable, machine-readable diagnostic identifiers spanning the whole pipeline. Codes use disjoint string namespaces per layer:
E***- lexer errors (featurelexer)W***- lexer warnings (featurelexer)P***- parser errors (featureparser)PW***- parser warnings (featureparser)T***- transform errors (featuretransform)TW***- transform warnings (featuretransform)G***- codegen errors (featurecodegen)GW***- codegen warnings (featurecodegen)
Custom { code, severity } is the escape hatch for third-party
transformers that want to emit through the same engine without forking
this enum.
Variants§
Custom
Carry an arbitrary code string + explicit severity through the same engine. For third-party transformer authors who don’t want to fork this enum. Prefer adding a typed variant when contributing upstream.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Code
impl<'de> Deserialize<'de> for Code
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DiagnosticCode for Code
impl DiagnosticCode for Code
Auto Trait Implementations§
impl Freeze for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnsafeUnpin for Code
impl UnwindSafe for Code
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