pub struct MjsTuple { /* private fields */ }Expand description
Implementations§
Source§impl MjsTuple
impl MjsTuple
Sourcepub fn set_objtype(&mut self, value: &[MjtObj]) -> Result<(), MjEditError>
pub fn set_objtype(&mut self, value: &[MjtObj]) -> Result<(), MjEditError>
Set object types. Every value must be a real object type (an MjtObj below mjNOBJECT).
§Errors
Returns MjEditError::InvalidParameter when any value is not a real object type (i.e. not below MjtObj::mjNOBJECT) (in that case nothing is written).
Sourcepub fn set_objname(&mut self, value: &str)
pub fn set_objname(&mut self, value: &str)
Splits the objname and put the split text as object names.
§Panics
When the value contains ‘\0’ characters, a panic occurs.
Sourcepub fn append_objname(&mut self, value: &str)
pub fn append_objname(&mut self, value: &str)
Appends objname as a single entry to object names.
§Panics
When the value contains ‘\0’ characters, a panic occurs.
Sourcepub fn set_objprm(&mut self, value: &[f64])
pub fn set_objprm(&mut self, value: &[f64])
Set object parameters.
Trait Implementations§
Source§impl SpecItem for MjsTuple
impl SpecItem for MjsTuple
Source§fn element_pointer(&self) -> *const mjsElement
fn element_pointer(&self) -> *const mjsElement
Returns the
mjsElement that MuJoCo keeps behind the item. Read moreSource§fn element_mut_pointer(&mut self) -> *mut mjsElement
fn element_mut_pointer(&mut self) -> *mut mjsElement
Same as
SpecItem::element_pointer, but with a mutable borrow and a mutable pointer.Source§fn default(&self) -> Option<&MjsDefault>
fn default(&self) -> Option<&MjsDefault>
Returns the used default, or
None when the element carries no default class name. Read moreSource§fn id(&self) -> Option<usize>
fn id(&self) -> Option<usize>
Returns the numeric id for this element, or
None when it has none yet (before
compilation, for example).Source§fn set_default(&mut self, class_name: &str) -> Result<(), MjEditError>
fn set_default(&mut self, class_name: &str) -> Result<(), MjEditError>
Assign the item to a default class. Read more
Source§fn with_default(&mut self, class_name: &str) -> Result<&mut Self, MjEditError>
fn with_default(&mut self, class_name: &str) -> Result<&mut Self, MjEditError>
Builder style make the item inherit from a default class. Read more
Source§impl SpecObject for MjsTuple
impl SpecObject for MjsTuple
Source§const OBJ_TYPE: MjtObj = MjtObj::mjOBJ_TUPLE
const OBJ_TYPE: MjtObj = MjtObj::mjOBJ_TUPLE
The
mjtObj discriminant passed to mjs_firstElement / mjs_firstChild.Source§unsafe fn from_element_as_ptr_mut(element: *mut mjsElement) -> *mut Self
unsafe fn from_element_as_ptr_mut(element: *mut mjsElement) -> *mut Self
Auto Trait Implementations§
impl !Send for MjsTuple
impl !Sync for MjsTuple
impl !Unpin for MjsTuple
impl Freeze for MjsTuple
impl RefUnwindSafe for MjsTuple
impl UnsafeUnpin for MjsTuple
impl UnwindSafe for MjsTuple
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
Mutably borrows from an owned value. Read more
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more