#[non_exhaustive]pub enum MjSceneError {
SceneFull {
capacity: i32,
},
LabelTooLong {
len: usize,
capacity: usize,
},
InvalidAuxBufferIndex {
index: usize,
},
InvalidViewport {
width: i32,
height: i32,
},
BufferTooSmall {
name: &'static str,
got: usize,
needed: usize,
},
FigureBufferFull {
plot_index: usize,
capacity: usize,
},
FigureIndexOutOfBounds {
plot_index: usize,
point_index: usize,
current_len: usize,
},
InvalidPlotIndex {
plot_index: usize,
max_plots: usize,
},
NonAsciiLabel,
InvalidCameraType(i32),
}Expand description
Errors that can occur in 3-D scene and visualization operations
(MjvScene, MjrContext).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SceneFull
No more space is available for new geoms in the scene.
Increase the max_geom capacity passed to
MjvScene::new.
LabelTooLong
A string label exceeds the fixed-size label buffer of an MjvGeom.
Fields
InvalidAuxBufferIndex
An auxiliary buffer index is out of the valid range [0, mjNAUX).
InvalidViewport
A viewport has invalid (negative) dimensions.
Fields
BufferTooSmall
A pixel buffer passed to a rendering operation is too small.
Fields
FigureBufferFull
The figure’s line-data buffer for a given plot is full.
Fields
FigureIndexOutOfBounds
A point index is out of range for the current data in a figure plot.
Fields
InvalidPlotIndex
A plot index is out of the valid range [0, mjMAXLINE).
Fields
NonAsciiLabel
A geom label string contains non-ASCII bytes.
MuJoCo’s renderer treats the label buffer as ASCII; multi-byte UTF-8 sequences would be rendered as garbage characters.
InvalidCameraType(i32)
An integer value does not correspond to any known camera type variant.
Trait Implementations§
Source§impl Clone for MjSceneError
impl Clone for MjSceneError
Source§fn clone(&self) -> MjSceneError
fn clone(&self) -> MjSceneError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MjSceneError
impl Debug for MjSceneError
Source§impl Display for MjSceneError
impl Display for MjSceneError
Source§impl Error for MjSceneError
impl Error for MjSceneError
1.30.0 · 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<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<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 PartialEq for MjSceneError
impl PartialEq for MjSceneError
impl Eq for MjSceneError
impl StructuralPartialEq for MjSceneError
Auto Trait Implementations§
impl Freeze for MjSceneError
impl RefUnwindSafe for MjSceneError
impl Send for MjSceneError
impl Sync for MjSceneError
impl Unpin for MjSceneError
impl UnsafeUnpin for MjSceneError
impl UnwindSafe for MjSceneError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.