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 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<FromStrError> for QError
impl From<FromStrError> for QError
source§fn from(error: FromStrError) -> Self
fn from(error: FromStrError) -> 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<ImageError> for QError
impl From<ImageError> for QError
source§fn from(error: ImageError) -> Self
fn from(error: ImageError) -> 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.
Auto Trait Implementations§
impl !RefUnwindSafe for QError
impl !Send for QError
impl !Sync for QError
impl Unpin for QError
impl !UnwindSafe for QError
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SetParameter for T
impl<T> SetParameter for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.