pub struct SegmentationId(/* private fields */);Implementations§
Source§impl SegmentationId
impl SegmentationId
pub fn index(&self) -> usize
Sourcepub unsafe fn new_unchecked(index: usize) -> Self
pub unsafe fn new_unchecked(index: usize) -> Self
SAFETY: This function should only be used when you are sure that the index is valid for a segmentation id.
Sourcepub fn to_object_info(&self) -> (mjtObj, usize)
pub fn to_object_info(&self) -> (mjtObj, usize)
convert SegmentationId to corresponding object type and index
Sourcepub fn to_object_id<O: Obj>(&self) -> Option<ObjectId<O>>
pub fn to_object_id<O: Obj>(&self) -> Option<ObjectId<O>>
try to convert SegmentationId to ObjectId<O>
Trait Implementations§
Source§impl Clone for SegmentationId
impl Clone for SegmentationId
Source§fn clone(&self) -> SegmentationId
fn clone(&self) -> SegmentationId
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SegmentationId
impl Debug for SegmentationId
Source§impl Ord for SegmentationId
impl Ord for SegmentationId
Source§fn cmp(&self, other: &SegmentationId) -> Ordering
fn cmp(&self, other: &SegmentationId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SegmentationId
impl PartialEq for SegmentationId
Source§impl PartialOrd for SegmentationId
impl PartialOrd for SegmentationId
impl Copy for SegmentationId
impl Eq for SegmentationId
impl StructuralPartialEq for SegmentationId
Auto Trait Implementations§
impl Freeze for SegmentationId
impl RefUnwindSafe for SegmentationId
impl Send for SegmentationId
impl Sync for SegmentationId
impl Unpin for SegmentationId
impl UnwindSafe for SegmentationId
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