pub trait SourceLanguage:
Debug
+ Clone
+ PartialEq
+ Eq
+ Sized {
type Warning: Diagnostic + Clone + PartialEq;
const ERROR_CODE: &'static str;
// Required method
fn import(source_text: &str) -> Import<Self>;
}Expand description
Name a source language by the code of its errors and the type of its warnings, and import its text.
Required Associated Constants§
Sourceconst ERROR_CODE: &'static str
const ERROR_CODE: &'static str
Spell the stable diagnostic code of the language’s errors.
Required Associated Types§
Sourcetype Warning: Diagnostic + Clone + PartialEq
type Warning: Diagnostic + Clone + PartialEq
Type the warnings the language raises beside its errors.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".