Struct rtlola_reporting::Diagnostic
source · [−]pub struct Diagnostic { /* private fields */ }
Expand description
A Diagnostic
is more flexible way to build and output errors and warnings.
Implementations
sourceimpl Diagnostic
impl Diagnostic
sourcepub fn add_span_with_label(
self,
span: Span,
label: Option<&str>,
primary: bool
) -> Self
pub fn add_span_with_label(
self,
span: Span,
label: Option<&str>,
primary: bool
) -> Self
Adds a code span to the diagnostic.
The label
is printed next to the code fragment the span refers to.
If primary
is set to true the span is treated as the primary code fragment.
sourcepub fn maybe_add_span_with_label(
self,
span: Option<Span>,
label: Option<&str>,
primary: bool
) -> Self
pub fn maybe_add_span_with_label(
self,
span: Option<Span>,
label: Option<&str>,
primary: bool
) -> Self
Adds a code span to the diagnostic if the span is available.
The label
is printed next to the code fragment the span refers to.
If primary
is set to true the span is treated as the primary code fragment.
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 more
sourceimpl 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 From<Diagnostic> for RawDiagnostic<()>
impl From<Diagnostic> for RawDiagnostic<()>
sourcefn from(diag: Diagnostic) -> Self
fn from(diag: Diagnostic) -> Self
Converts to this type from the input type.
sourceimpl From<Diagnostic> for RtLolaError
impl From<Diagnostic> for RtLolaError
sourcefn from(diag: Diagnostic) -> Self
fn from(diag: Diagnostic) -> Self
Converts to this type from the input type.
sourceimpl FromIterator<Diagnostic> for RtLolaError
impl FromIterator<Diagnostic> for RtLolaError
sourcefn from_iter<T: IntoIterator<Item = Diagnostic>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Diagnostic>>(iter: T) -> Self
Creates a value from an iterator. Read more
sourceimpl Serialize for Diagnostic
impl Serialize 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more