Struct devise::Diagnostic
pub struct Diagnostic { /* private fields */ }Expand description
A structure representing a diagnostic message and associated children messages.
Implementations§
§impl Diagnostic
impl Diagnostic
pub fn new<T>(level: Level, message: T) -> Diagnosticwhere
T: Into<String>,
pub fn new<T>(level: Level, message: T) -> Diagnosticwhere T: Into<String>,
Creates a new diagnostic with the given level and message.
pub fn spanned<S, T>(spans: S, level: Level, message: T) -> Diagnosticwhere
S: MultiSpan,
T: Into<String>,
pub fn spanned<S, T>(spans: S, level: Level, message: T) -> Diagnosticwhere S: MultiSpan, T: Into<String>,
Creates a new diagnostic with the given level and message pointing
to the given set of spans.
pub fn spanned_child<S, T>(
self,
spans: S,
level: Level,
message: T
) -> Diagnosticwhere
S: MultiSpan,
T: Into<String>,
pub fn spanned_child<S, T>( self, spans: S, level: Level, message: T ) -> Diagnosticwhere S: MultiSpan, T: Into<String>,
Adds a new child diagnostic message to self with the level and the
given spans and message.
pub fn child<T>(self, level: Level, message: T) -> Diagnosticwhere
T: Into<String>,
pub fn child<T>(self, level: Level, message: T) -> Diagnosticwhere T: Into<String>,
Adds a new child diagnostic message to self with level and the given
message.
pub fn span_error<S, T>(self, spans: S, message: T) -> Diagnosticwhere
S: MultiSpan,
T: Into<String>,
pub fn span_error<S, T>(self, spans: S, message: T) -> Diagnosticwhere S: MultiSpan, T: Into<String>,
Adds a new child diagnostic message to self with the level
identified by this method’s name with the given spans and
message.
pub fn error<T>(self, message: T) -> Diagnosticwhere
T: Into<String>,
pub fn error<T>(self, message: T) -> Diagnosticwhere T: Into<String>,
Adds a new child diagnostic message to self with the level
identified by this method’s name with the given message.
pub fn span_warning<S, T>(self, spans: S, message: T) -> Diagnosticwhere
S: MultiSpan,
T: Into<String>,
pub fn span_warning<S, T>(self, spans: S, message: T) -> Diagnosticwhere S: MultiSpan, T: Into<String>,
Adds a new child diagnostic message to self with the level
identified by this method’s name with the given spans and
message.
pub fn warning<T>(self, message: T) -> Diagnosticwhere
T: Into<String>,
pub fn warning<T>(self, message: T) -> Diagnosticwhere T: Into<String>,
Adds a new child diagnostic message to self with the level
identified by this method’s name with the given message.
pub fn span_note<S, T>(self, spans: S, message: T) -> Diagnosticwhere
S: MultiSpan,
T: Into<String>,
pub fn span_note<S, T>(self, spans: S, message: T) -> Diagnosticwhere S: MultiSpan, T: Into<String>,
Adds a new child diagnostic message to self with the level
identified by this method’s name with the given spans and
message.
pub fn note<T>(self, message: T) -> Diagnosticwhere
T: Into<String>,
pub fn note<T>(self, message: T) -> Diagnosticwhere T: Into<String>,
Adds a new child diagnostic message to self with the level
identified by this method’s name with the given message.
pub fn span_help<S, T>(self, spans: S, message: T) -> Diagnosticwhere
S: MultiSpan,
T: Into<String>,
pub fn span_help<S, T>(self, spans: S, message: T) -> Diagnosticwhere S: MultiSpan, T: Into<String>,
Adds a new child diagnostic message to self with the level
identified by this method’s name with the given spans and
message.
pub fn help<T>(self, message: T) -> Diagnosticwhere
T: Into<String>,
pub fn help<T>(self, message: T) -> Diagnosticwhere T: Into<String>,
Adds a new child diagnostic message to self with the level
identified by this method’s name with the given message.
pub fn children(&self) -> impl Iterator<Item = &Diagnostic>
pub fn children(&self) -> impl Iterator<Item = &Diagnostic>
Return the children diagnostics of self.
pub fn emit_as_item_tokens(self) -> TokenStream
pub fn emit_as_item_tokens(self) -> TokenStream
Emit tokens, suitable for item contexts, to generate a comple-time
diagnostic corresponding to self. On nightly, this directly emits the
error and returns an empty token stream.
pub fn emit_as_item_tokens_or(self, default: TokenStream) -> TokenStream
pub fn emit_as_item_tokens_or(self, default: TokenStream) -> TokenStream
Emit tokens, suitable for item contexts, to generate a comple-time
diagnostic corresponding to self. On nightly, this directly emits the
error and returns default.
pub fn emit_as_expr_tokens(self) -> TokenStream
pub fn emit_as_expr_tokens(self) -> TokenStream
Emit tokens, suitable for expression contexts, to generate a comple-time
diagnostic corresponding to self. On nightly, this directly emits the
error and returns a () token stream.
pub fn emit_as_expr_tokens_or(self, default: TokenStream) -> TokenStream
pub fn emit_as_expr_tokens_or(self, default: TokenStream) -> TokenStream
Emit tokens, suitable for expressioon contexts, to generate a
comple-time diagnostic corresponding to self. On nightly, this
directly emits the error and returns default.
Trait Implementations§
§impl Clone for Diagnostic
impl Clone for Diagnostic
§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more