#[non_exhaustive]pub enum WireError {
UnknownFormat {
found: Option<String>,
},
MissingVersion,
UnsupportedVersion {
found: String,
supported: FormatVersion,
},
UnknownKind {
kind: String,
version: FormatVersion,
},
UnknownField {
field: String,
version: FormatVersion,
},
NonFinite {
path: String,
},
InvalidGraph {
node: Option<usize>,
error: GraphError,
},
Malformed {
detail: String,
},
}Expand description
Why a graph could not be written or a payload could not be read.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownFormat
The payload’s format entry is missing or names another format.
MissingVersion
The payload has no version entry.
UnsupportedVersion
The payload’s version is not MAJOR.MINOR, is of another major, or
is a newer minor than this reader supports.
Fields
supported: FormatVersionThe newest version this reader reads.
UnknownKind
A node kind or enum variant this reader does not know. The payload is refused whole: skipping the kind would lose geometry silently.
UnknownField
A field this reader does not know.
NonFinite
A number that is NaN or infinite, which neither encoding carries.
Fields
InvalidGraph
The decoded graph fails the validation every graph construction runs.
Fields
error: GraphErrorWhy.
Malformed
The payload does not decode: bad syntax, a wrong type, a missing field, trailing bytes, or nesting past the decoder’s limit.
Trait Implementations§
impl Eq for WireError
Source§impl Error for WireError
impl Error for WireError
1.30.0 · 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()
impl StructuralPartialEq for WireError
Auto Trait Implementations§
impl Freeze for WireError
impl RefUnwindSafe for WireError
impl Send for WireError
impl Sync for WireError
impl Unpin for WireError
impl UnsafeUnpin for WireError
impl UnwindSafe for WireError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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