#[non_exhaustive]pub enum RendererError {
EventLoopError(EventLoopError),
GlutinError(Error),
ZeroDimension,
GlInitFailed(GlInitError),
RgbDisabled,
DepthDisabled,
DimensionMismatch,
IoError(Error),
SceneError(MjSceneError),
ContextError(MjrContextError),
SignatureMismatch,
}Expand description
Errors that can occur during renderer operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EventLoopError(EventLoopError)
The event loop failed to initialize.
GlutinError(Error)
A glutin operation failed.
ZeroDimension
The supplied width or height was zero; MuJoCo requires positive dimensions.
GlInitFailed(GlInitError)
OpenGL / window initialization failed.
RgbDisabled
RGB rendering was not enabled.
DepthDisabled
Depth rendering was not enabled.
DimensionMismatch
The requested WIDTH/HEIGHT do not match the renderer’s dimensions.
IoError(Error)
An I/O error occurred (e.g. while saving to a file).
SceneError(MjSceneError)
A scene operation failed (e.g. user-scene sync overflowed the geom buffer).
ContextError(MjrContextError)
A rendering-context operation failed (e.g. an asset or aux-buffer ID is out of range).
SignatureMismatch
The model’s structure signature does not match the renderer’s scene.
Call MjRenderer::sync_data first.
Trait Implementations§
Source§impl Debug for RendererError
impl Debug for RendererError
Source§impl Display for RendererError
Formats a human-readable description of the renderer error.
impl Display for RendererError
Formats a human-readable description of the renderer error.
Source§impl Error for RendererError
Provides the underlying error source, if any.
impl Error for RendererError
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<EncodingError> for RendererError
Converts a png::EncodingError into RendererError::IoError.
impl From<EncodingError> for RendererError
Converts a png::EncodingError into RendererError::IoError.
Source§fn from(e: EncodingError) -> Self
fn from(e: EncodingError) -> Self
Source§impl From<Error> for RendererError
Converts an io::Error into RendererError::IoError.
impl From<Error> for RendererError
Converts an io::Error into RendererError::IoError.
Source§impl From<GlInitError> for RendererError
Available on crate feature renderer-winit-fallback only.Converts a GlInitError into RendererError::GlInitFailed.
impl From<GlInitError> for RendererError
renderer-winit-fallback only.Converts a GlInitError into RendererError::GlInitFailed.
Source§fn from(e: GlInitError) -> Self
fn from(e: GlInitError) -> Self
Source§impl From<MjSceneError> for RendererError
Converts an MjSceneError into RendererError::SceneError.
impl From<MjSceneError> for RendererError
Converts an MjSceneError into RendererError::SceneError.
Source§fn from(e: MjSceneError) -> Self
fn from(e: MjSceneError) -> Self
Source§impl From<MjrContextError> for RendererError
Converts an crate::error::MjrContextError into RendererError::ContextError.
impl From<MjrContextError> for RendererError
Converts an crate::error::MjrContextError into RendererError::ContextError.
Source§fn from(e: MjrContextError) -> Self
fn from(e: MjrContextError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for RendererError
impl !UnwindSafe for RendererError
impl Freeze for RendererError
impl Send for RendererError
impl Sync for RendererError
impl Unpin for RendererError
impl UnsafeUnpin for RendererError
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.