pub enum Omf1Error {
NotOmf1,
UnsupportedVersion {
version: String,
},
WrongType {
found: ModelType,
expected: &'static [ModelType],
},
MissingItem {
key: String,
},
NonIntegerArray,
IndexOutOfRange {
index: i64,
},
DeserializationFailed(Error),
}
Expand description
Errors specific to the OMF v1 conversion process.
Converted fails may also fail validation during conversion, as the checks in OMF v1 weren’t as strict.
Variants§
NotOmf1
Tried to load a file that is not in OMF1 format.
UnsupportedVersion
The OMF version is not supported.
WrongType
A record in the JSON data has the wrong type.
MissingItem
A record is missing from the JSON data.
NonIntegerArray
Non-integer values from in what should be an integer array.
IndexOutOfRange
An integer index is invalid.
DeserializationFailed(Error)
Forwards serde_json
errors when deserializing OMF1.
Trait Implementations§
source§impl Error for Omf1Error
impl Error for Omf1Error
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 Freeze for Omf1Error
impl !RefUnwindSafe for Omf1Error
impl Send for Omf1Error
impl Sync for Omf1Error
impl Unpin for Omf1Error
impl !UnwindSafe for Omf1Error
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