Enum omf::error::InvalidData
source · pub enum InvalidData {
LengthMismatch {
found: u64,
expected: u64,
},
SizeZeroOrLess {
value: f64,
},
BoundaryDecreases,
IndexOutOfRange {
value: u64,
maximum: u64,
},
BlockIndexOutOfRange {
value: [u32; 3],
maximum: [u32; 3],
},
RegularSubblockZeroSize {
corners: [u32; 6],
},
RegularSubblockOutsideParent {
corners: [u32; 6],
maximum: [u32; 3],
},
RegularSubblockNotInMode {
corners: [u32; 6],
mode: SubblockMode,
},
FreeformSubblockZeroSize {
corners: [f64; 6],
},
FreeformSubblockOutsideParent {
corners: [f64; 6],
},
}
Expand description
Ways that data, either in a file or being written to one, can be invalid.
Variants§
LengthMismatch
Data length does not match the Array.
SizeZeroOrLess
A size is <= 0.
BoundaryDecreases
A discrete colormap boundary is less than the previous boundary.
IndexOutOfRange
A segment, triangle, or category index is out of range.
BlockIndexOutOfRange
A block index is out of range.
RegularSubblockZeroSize
A regular sub-block has zero or negative size.
RegularSubblockOutsideParent
A regular sub-block extends outside the parent.
RegularSubblockNotInMode
A regular sub-block doesn’t match the octree or full sub-block mode.
FreeformSubblockZeroSize
A free-form sub-block has zero or negative size.
FreeformSubblockOutsideParent
A free-form sub-block is outside the [0.0, 1.0] parent range.
Trait Implementations§
source§impl Clone for InvalidData
impl Clone for InvalidData
source§fn clone(&self) -> InvalidData
fn clone(&self) -> InvalidData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InvalidData
impl Debug for InvalidData
source§impl Display for InvalidData
impl Display for InvalidData
source§impl Error for InvalidData
impl Error for InvalidData
1.30.0 · 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()
source§impl From<InvalidData> for Error
impl From<InvalidData> for Error
source§fn from(value: InvalidData) -> Self
fn from(value: InvalidData) -> Self
Converts to this type from the input type.
source§impl PartialEq for InvalidData
impl PartialEq for InvalidData
impl StructuralPartialEq for InvalidData
Auto Trait Implementations§
impl Freeze for InvalidData
impl RefUnwindSafe for InvalidData
impl Send for InvalidData
impl Sync for InvalidData
impl Unpin for InvalidData
impl UnwindSafe for InvalidData
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)