#[non_exhaustive]pub enum MjDataError {
IndexOutOfBounds {
kind: &'static str,
id: usize,
upper: usize,
},
UnsupportedObjectType(i32),
AllocationFailed,
BufferTooSmall {
name: &'static str,
got: usize,
needed: usize,
},
LengthMismatch {
name: &'static str,
expected: usize,
got: usize,
},
SignatureMismatch {
source: u64,
destination: u64,
},
NoHistoryBuffer {
kind: &'static str,
id: usize,
},
ContactBufferFull,
InvalidUtf8Path,
}Expand description
Errors that can occur in MjData physics data
and Jacobian operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IndexOutOfBounds
A provided object or body index was out of the valid range.
Fields
UnsupportedObjectType(i32)
The provided MuJoCo object type is not supported by this operation.
Contains the raw MuJoCo C object-type code (mjOBJ_*) that was not recognized.
AllocationFailed
MuJoCo failed to allocate the requested structure.
BufferTooSmall
A buffer passed to the operation is too small for the required data.
Fields
LengthMismatch
A slice or array parameter has the wrong length for the operation.
Fields
SignatureMismatch
Two model-signature-bound objects were created from different models.
This is returned by APIs that require matching model signatures, including data-copy operations and info-view accessors.
Fields
NoHistoryBuffer
The specified actuator or sensor has no associated history buffer.
Fields
ContactBufferFull
The contact buffer is full; no more contacts can be added.
InvalidUtf8Path
A filesystem path argument contains invalid UTF-8.
Trait Implementations§
Source§impl Clone for MjDataError
impl Clone for MjDataError
Source§fn clone(&self) -> MjDataError
fn clone(&self) -> MjDataError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MjDataError
impl Debug for MjDataError
Source§impl Display for MjDataError
impl Display for MjDataError
Source§impl Error for MjDataError
impl Error for MjDataError
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 PartialEq for MjDataError
impl PartialEq for MjDataError
impl Eq for MjDataError
impl StructuralPartialEq for MjDataError
Auto Trait Implementations§
impl Freeze for MjDataError
impl RefUnwindSafe for MjDataError
impl Send for MjDataError
impl Sync for MjDataError
impl Unpin for MjDataError
impl UnsafeUnpin for MjDataError
impl UnwindSafe for MjDataError
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.