Enum nobject_rs::ObjError
source · pub enum ObjError {
Tokenize(TokenizeError),
ModelParse(ModelError),
MaterialParse(MaterialError),
UnexpectedToken(Token),
InvalidOnOffValue(String),
}
Expand description
The set of errors which might be generated.
Variants§
Tokenize(TokenizeError)
A tokenization error, typically something in the file is not as the parser expects it.
ModelParse(ModelError)
The result of an error constructing a Model
from the token stream.
MaterialParse(MaterialError)
The result of an error constructing a Material
collection from the token stream.
UnexpectedToken(Token)
An unexpected token was encountered in the token stream.
InvalidOnOffValue(String)
The specification for obj/mtl files has some settings either being “on” or “off”. If there is an issue parsing those values, this error will occur.
Trait Implementations§
source§impl Error for ObjError
impl Error for ObjError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<MaterialError> for ObjError
impl From<MaterialError> for ObjError
source§fn from(source: MaterialError) -> Self
fn from(source: MaterialError) -> Self
Converts to this type from the input type.
source§impl From<ModelError> for ObjError
impl From<ModelError> for ObjError
source§fn from(source: ModelError) -> Self
fn from(source: ModelError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ObjError
impl RefUnwindSafe for ObjError
impl Send for ObjError
impl Sync for ObjError
impl Unpin for ObjError
impl UnwindSafe for ObjError
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