Struct diagnostic_quick::QError
source · pub struct QError {
pub error: Box<QErrorKind>,
pub level: DiagnosticLevel,
pub source: Option<Box<dyn Error>>,
}Fields§
§error: Box<QErrorKind>§level: DiagnosticLevel§source: Option<Box<dyn Error>>Implementations§
source§impl QError
impl QError
pub fn as_diagnostic(&self) -> Diagnostic
source§impl QError
impl QError
pub fn syntax_error(msg: impl Into<String>) -> Self
pub fn runtime_error(msg: impl Into<String>) -> Self
pub fn kind(&self) -> &QErrorKind
pub fn with_file(self, file: &FileID) -> Self
pub fn with_range(self, range: &Range<usize>) -> Self
pub fn with_level(self, level: impl Into<DiagnosticLevel>) -> Self
Trait Implementations§
source§impl Error for QError
impl Error for QError
source§fn custom<T>(msg: T) -> Selfwhere
T: Display,
fn custom<T>(msg: T) -> Selfwhere
T: Display,
Raised when there is general error when deserializing a type. Read more
source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize receives a type different from what it was
expecting. Read moresource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize receives a value of the right type but that
is wrong for some other reason. Read moresource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
Raised when deserializing a sequence or map and the input data contains
too many or too few elements. Read more
source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Raised when a
Deserialize enum type received a variant with an
unrecognized name. Read moresource§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Raised when a
Deserialize struct type received a field with an
unrecognized name. Read moresource§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Raised when a
Deserialize struct type expected to receive a required
field with a particular name but that field was not present in the
input. Read moresource§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Raised when a
Deserialize struct type received more than one of the
same field. Read moresource§impl Error for QError
impl Error for QError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<CompareAndSwapError> for QError
impl From<CompareAndSwapError> for QError
source§fn from(error: CompareAndSwapError) -> Self
fn from(error: CompareAndSwapError) -> Self
Converts to this type from the input type.
source§impl From<DiagnosticError> for QError
impl From<DiagnosticError> for QError
source§fn from(error: DiagnosticError) -> Self
fn from(error: DiagnosticError) -> Self
Converts to this type from the input type.
source§impl From<FontLoadingError> for QError
impl From<FontLoadingError> for QError
source§fn from(error: FontLoadingError) -> Self
fn from(error: FontLoadingError) -> Self
Converts to this type from the input type.
source§impl From<GlyphLoadingError> for QError
impl From<GlyphLoadingError> for QError
source§fn from(error: GlyphLoadingError) -> Self
fn from(error: GlyphLoadingError) -> Self
Converts to this type from the input type.
source§impl From<ParseBigIntError> for QError
impl From<ParseBigIntError> for QError
source§fn from(error: ParseBigIntError) -> Self
fn from(error: ParseBigIntError) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for QError
impl From<ParseError> for QError
source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for QError
impl From<ParseError> for QError
source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for QError
impl From<ParseError> for QError
source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for QError
impl From<ParseError> for QError
source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
source§impl From<ParseFloatError> for QError
impl From<ParseFloatError> for QError
source§fn from(error: ParseFloatError) -> Self
fn from(error: ParseFloatError) -> Self
Converts to this type from the input type.
source§impl From<ParseIntError> for QError
impl From<ParseIntError> for QError
source§fn from(error: ParseIntError) -> Self
fn from(error: ParseIntError) -> Self
Converts to this type from the input type.
source§impl<T> From<PoisonError<T>> for QError
impl<T> From<PoisonError<T>> for QError
source§fn from(error: PoisonError<T>) -> Self
fn from(error: PoisonError<T>) -> Self
Converts to this type from the input type.
source§impl From<SelectionError> for QError
impl From<SelectionError> for QError
source§fn from(error: SelectionError) -> Self
fn from(error: SelectionError) -> Self
Converts to this type from the input type.
source§impl<T> From<TryFromBigIntError<T>> for QErrorwhere
T: Error + 'static,
impl<T> From<TryFromBigIntError<T>> for QErrorwhere
T: Error + 'static,
source§fn from(error: TryFromBigIntError<T>) -> Self
fn from(error: TryFromBigIntError<T>) -> Self
Converts to this type from the input type.