Struct clarity_repl::clarity::diagnostic::Diagnostic
source · [−]pub struct Diagnostic {
pub level: Level,
pub message: String,
pub spans: Vec<Span>,
pub suggestion: Option<String>,
}
Fields
level: Level
message: String
spans: Vec<Span>
suggestion: Option<String>
Implementations
sourceimpl Diagnostic
impl Diagnostic
pub fn err(error: &dyn DiagnosableError) -> Diagnostic
pub fn add_span(
&mut self,
start_line: u32,
start_column: u32,
end_line: u32,
end_column: u32
)
pub fn output(&self, name: &str, lines: &Vec<String>) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
pub fn output_code(&self, lines: &Vec<String>) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Trait Implementations
sourceimpl Clone for Diagnostic
impl Clone for Diagnostic
sourcefn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Diagnostic
impl Debug for Diagnostic
sourceimpl<'de> Deserialize<'de> for Diagnostic
impl<'de> Deserialize<'de> for Diagnostic
sourcefn 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
sourceimpl Display for Diagnostic
impl Display for Diagnostic
sourceimpl PartialEq<Diagnostic> for Diagnostic
impl PartialEq<Diagnostic> for Diagnostic
sourcefn eq(&self, other: &Diagnostic) -> bool
fn eq(&self, other: &Diagnostic) -> bool
sourceimpl Serialize for Diagnostic
impl Serialize for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more