pub enum SaveError {
NonFinite {
id: String,
field: String,
},
DuplicateId {
id: String,
},
Cursor {
id: String,
},
MissingAnchors {
id: String,
tool: DrawingToolType,
anchors: usize,
needed: usize,
},
UnmappedAnchor {
id: String,
point: usize,
},
Json(Error),
}Expand description
Why DrawingStorage::to_json did not save.
Variants§
NonFinite
A drawing holds NaN or an infinity, which JSON cannot store, or a size or pitchfork level out of the range drawings are drawn at, and loading skips it.
Fields
DuplicateId
Two drawings have the same id, and loading keeps only the first.
Cursor
A drawing’s tool is a cursor, such as the eraser, and loading skips it.
MissingAnchors
A drawing has fewer anchors than its tool draws with, and loading skips it.
Fields
§
tool: DrawingToolTypeThe tool of the drawing.
UnmappedAnchor
An anchor has no time mapping or its timestamp is outside the supported range.
Json(Error)
Serialization failed.
Trait Implementations§
Source§impl Error for SaveError
impl Error for SaveError
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 SaveError
impl !UnwindSafe for SaveError
impl Freeze for SaveError
impl Send for SaveError
impl Sync for SaveError
impl Unpin for SaveError
impl UnsafeUnpin for SaveError
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
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> ⓘ
Converts
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> ⓘ
Converts
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