#[non_exhaustive]pub enum SkipReason {
UnknownTool(ParseToolTypeError),
Cursor {
tool: DrawingToolType,
},
MissingAnchors {
tool: DrawingToolType,
anchors: usize,
needed: usize,
},
DuplicateId {
id: String,
},
Invalid(Error),
}Expand description
Why DrawingStorage::from_json left a drawing out.
An UnknownTool in a file of version 2 or later was most likely written
by a newer release that added the tool: keep the file. The other reasons describe damaged or
hand-edited data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownTool(ParseToolTypeError)
The tool is not one this release knows; ParseToolTypeError::input holds its name.
Cursor
The tool is a cursor, such as the eraser, which creates no drawing.
Fields
tool: DrawingToolTypeThe cursor tool.
MissingAnchors
The drawing has fewer anchors than its tool draws with.
Fields
tool: DrawingToolTypeThe tool of the drawing.
DuplicateId
An earlier drawing in the file has the same id; the first one is loaded.
Invalid(Error)
A field is missing or has the wrong type, or a value is out of range, such as a null
written for a non-finite number, a timestamp outside the supported range or a setting
out of bounds.
Trait Implementations§
Source§impl Debug for SkipReason
impl Debug for SkipReason
Source§impl Display for SkipReason
impl Display for SkipReason
Source§impl Error for SkipReason
impl Error for SkipReason
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for SkipReason
impl !UnwindSafe for SkipReason
impl Freeze for SkipReason
impl Send for SkipReason
impl Sync for SkipReason
impl Unpin for SkipReason
impl UnsafeUnpin for SkipReason
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more