#[non_exhaustive]pub enum Error {
Io(Error),
InputIo {
context: String,
path: PathBuf,
source: Error,
},
Data(Diagnostic),
Render(Diagnostic),
Operation(Box<OperationFailure>),
Cancelled,
}Expand description
Error returned by plotting operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(Error)
Filesystem input or output failed.
InputIo
An adopted local input failed, retaining its actual path and OS cause.
Fields
Data(Diagnostic)
Input data or a data-bound visual option is invalid.
Render(Diagnostic)
Layout, backend, font, or output rendering failed.
Operation(Box<OperationFailure>)
A failure with a separately observable external effect.
Cancelled
The requested operation was cancelled before completion.
Implementations§
Source§impl Error
impl Error
Sourcepub fn diagnostic(&self) -> Option<&Diagnostic>
pub fn diagnostic(&self) -> Option<&Diagnostic>
Inspect the original diagnostic of a data or rendering error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Errorwhere
*const () is !null: Freeze,
PhantomData<ErrorData<CustomOwner>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<DiagnosticData> is !null: Freeze,
PhantomData<ArcInner<DiagnosticData>>: Freeze,
*const OperationFailure is !null: Freeze,
PhantomData<OperationFailure>: Freeze,
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Errorwhere
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<DiagnosticData> is !null: UnsafeUnpin,
PhantomData<ArcInner<DiagnosticData>>: UnsafeUnpin,
*const OperationFailure is !null: UnsafeUnpin,
PhantomData<OperationFailure>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.