pub struct CompilerErrorDetail {
pub category: ErrorCategory,
pub reason: String,
pub description: Option<String>,
pub loc: Option<SourceLocation>,
pub suggestions: Option<Vec<CompilerSuggestion>>,
}Expand description
Legacy-style error detail (matches CompilerErrorDetail in TS)
Fields§
§category: ErrorCategory§reason: String§description: Option<String>§loc: Option<SourceLocation>§suggestions: Option<Vec<CompilerSuggestion>>Implementations§
Source§impl CompilerErrorDetail
impl CompilerErrorDetail
pub fn new(category: ErrorCategory, reason: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_loc(self, loc: Option<SourceLocation>) -> Self
pub fn severity(&self) -> ErrorSeverity
pub fn logged_severity(&self) -> ErrorSeverity
Trait Implementations§
Source§impl Clone for CompilerErrorDetail
impl Clone for CompilerErrorDetail
Source§fn clone(&self) -> CompilerErrorDetail
fn clone(&self) -> CompilerErrorDetail
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompilerErrorDetail
impl Debug for CompilerErrorDetail
Auto Trait Implementations§
impl Freeze for CompilerErrorDetail
impl RefUnwindSafe for CompilerErrorDetail
impl Send for CompilerErrorDetail
impl Sync for CompilerErrorDetail
impl Unpin for CompilerErrorDetail
impl UnsafeUnpin for CompilerErrorDetail
impl UnwindSafe for CompilerErrorDetail
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