#[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()