pub enum Error {
MissingData,
Unexpected(usize),
Parse(usize),
TooManyFacets(<u32 as TryFrom<usize>>::Error),
TryFromInt(TryFromIntError),
Io(Error),
}Expand description
Possible errors that come from loading a file
Variants§
MissingData
Generally used when a binary buffer fails to parse but could also mean that an ASCII STL is missing data.
Unexpected(usize)
Represents unexpected data when parsing an ASCII STL file.
Parse(usize)
Represents a failure to parse a line, usually due to a malformed vertex.
TooManyFacets(<u32 as TryFrom<usize>>::Error)
Represents a failure to convert the number of triangles to a u32 (as required by the STL specification).
TryFromInt(TryFromIntError)
Represents a failure to convert an int.
Io(Error)
Represents any std::io result error.
Trait Implementations§
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(e: TryFromIntError) -> Self
fn from(e: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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