#[non_exhaustive]pub enum MjViewerError {
EventLoopError(EventLoopError),
GlutinError(Error),
PainterInitError(String),
GlInitFailed(GlInitError),
SceneError(MjSceneError),
ContextError(MjrContextError),
SignatureMismatch,
IndexOutOfBounds {
id: usize,
len: usize,
},
}Expand description
Errors that can occur when initializing or running the MuJoCo viewer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EventLoopError(EventLoopError)
The event loop failed to initialize.
GlutinError(Error)
A glutin operation failed.
PainterInitError(String)
Returned when the egui painter (OpenGL UI renderer) fails to initialize.
GlInitFailed(GlInitError)
OpenGL / window initialization failed.
SceneError(MjSceneError)
A scene operation failed (e.g. user-scene sync overflowed the geom buffer).
ContextError(MjrContextError)
A rendering-context operation failed (e.g. a pixel-read buffer is too small or the viewport has invalid dimensions).
SignatureMismatch
The model’s structure signature does not match the viewer’s passive model.
Call ViewerSharedState::sync_model or ViewerSharedState::sync_data first.
IndexOutOfBounds
The asset ID is out of range.
Trait Implementations§
Source§impl Debug for MjViewerError
impl Debug for MjViewerError
Source§impl Display for MjViewerError
Formats a human-readable description of the viewer error.
impl Display for MjViewerError
Formats a human-readable description of the viewer error.
Source§impl Error for MjViewerError
Provides the underlying error source, if any.
impl Error for MjViewerError
Provides the underlying error source, if any.
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()
Source§impl From<Error> for MjViewerError
Converts a glutin::error::Error into MjViewerError::GlutinError.
impl From<Error> for MjViewerError
Converts a glutin::error::Error into MjViewerError::GlutinError.
Source§impl From<GlInitError> for MjViewerError
Converts a GlInitError into MjViewerError::GlInitFailed.
impl From<GlInitError> for MjViewerError
Converts a GlInitError into MjViewerError::GlInitFailed.
Source§fn from(e: GlInitError) -> Self
fn from(e: GlInitError) -> Self
Source§impl From<MjSceneError> for MjViewerError
Converts an MjSceneError into MjViewerError::SceneError.
impl From<MjSceneError> for MjViewerError
Converts an MjSceneError into MjViewerError::SceneError.
Source§fn from(e: MjSceneError) -> Self
fn from(e: MjSceneError) -> Self
Source§impl From<MjrContextError> for MjViewerError
Converts an MjrContextError into MjViewerError::ContextError.
impl From<MjrContextError> for MjViewerError
Converts an MjrContextError into MjViewerError::ContextError.
Source§fn from(e: MjrContextError) -> Self
fn from(e: MjrContextError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for MjViewerError
impl !UnwindSafe for MjViewerError
impl Freeze for MjViewerError
impl Send for MjViewerError
impl Sync for MjViewerError
impl Unpin for MjViewerError
impl UnsafeUnpin for MjViewerError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.