#[non_exhaustive]pub enum MjEditError {
AllocationFailed,
InvalidUtf8Path,
ParseFailed(String),
CompileFailed(String),
SaveFailed(String),
NotFound,
AlreadyExists,
UnsupportedOperation,
DeleteFailed(String),
XmlBufferTooSmall {
required_size: usize,
},
}Expand description
Errors that can occur in model-specification editing operations
(MjSpec and related types).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AllocationFailed
MuJoCo failed to allocate the requested model element.
InvalidUtf8Path
A filesystem path argument contains invalid UTF-8.
ParseFailed(String)
MuJoCo failed to parse the XML (or other format) input.
CompileFailed(String)
MuJoCo failed to compile the spec into a model.
SaveFailed(String)
MuJoCo failed to save the spec to XML.
NotFound
A referenced element (e.g. parent default class) was not found.
AlreadyExists
An element with the same name already exists.
UnsupportedOperation
This operation is not supported for the current element.
DeleteFailed(String)
MuJoCo returned an error while attempting to delete the element.
XmlBufferTooSmall
The output buffer passed to MjSpec::save_xml_string
was too small to hold the XML.
required_size follows snprintf-style semantics: it is the number of bytes MuJoCo would
write, not counting the NUL terminator. To retry successfully, pass a buffer of at
least required_size + 1 bytes.
Trait Implementations§
Source§impl Clone for MjEditError
impl Clone for MjEditError
Source§fn clone(&self) -> MjEditError
fn clone(&self) -> MjEditError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MjEditError
impl Debug for MjEditError
Source§impl Display for MjEditError
impl Display for MjEditError
Source§impl Error for MjEditError
impl Error for MjEditError
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 MjEditError
impl PartialEq for MjEditError
impl Eq for MjEditError
impl StructuralPartialEq for MjEditError
Auto Trait Implementations§
impl Freeze for MjEditError
impl RefUnwindSafe for MjEditError
impl Send for MjEditError
impl Sync for MjEditError
impl Unpin for MjEditError
impl UnsafeUnpin for MjEditError
impl UnwindSafe for MjEditError
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.