#[non_exhaustive]pub enum GroupKind {
Arm(Arm),
Gripper(Gripper),
Generic(Generic),
}Expand description
Sum type of every group variant the robot can hold.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Arm(Arm)
Articulated arm.
Gripper(Gripper)
Single-motor gripper.
Generic(Generic)
Generic catch-all group.
Implementations§
Source§impl GroupKind
impl GroupKind
Sourcepub fn as_arm_mut(&mut self) -> Option<&mut Arm>
pub fn as_arm_mut(&mut self) -> Option<&mut Arm>
Downcast to Arm mutably.
Sourcepub fn as_gripper(&self) -> Option<&Gripper>
pub fn as_gripper(&self) -> Option<&Gripper>
Downcast to Gripper.
Sourcepub fn as_gripper_mut(&mut self) -> Option<&mut Gripper>
pub fn as_gripper_mut(&mut self) -> Option<&mut Gripper>
Downcast to Gripper mutably.
Sourcepub fn as_generic(&self) -> Option<&Generic>
pub fn as_generic(&self) -> Option<&Generic>
Downcast to Generic.
Sourcepub fn as_generic_mut(&mut self) -> Option<&mut Generic>
pub fn as_generic_mut(&mut self) -> Option<&mut Generic>
Downcast to Generic mutably.
Sourcepub fn inner(&self) -> &MotorGroup
pub fn inner(&self) -> &MotorGroup
Borrow the underlying MotorGroup regardless of variant.
Sourcepub fn inner_mut(&mut self) -> &mut MotorGroup
pub fn inner_mut(&mut self) -> &mut MotorGroup
Borrow mutably regardless of variant.
Sourcepub fn enable_all(&mut self) -> Result<(), Error>
pub fn enable_all(&mut self) -> Result<(), Error>
Enable all motors in this group (delegated).
Sourcepub fn disable_all(&mut self) -> Result<(), Error>
pub fn disable_all(&mut self) -> Result<(), Error>
Disable all motors in this group (delegated).
Sourcepub fn refresh_all(&mut self) -> Result<(), Error>
pub fn refresh_all(&mut self) -> Result<(), Error>
Send a state-refresh query to every motor in this group (delegated).
Auto Trait Implementations§
impl Freeze for GroupKind
impl RefUnwindSafe for GroupKind
impl Send for GroupKind
impl Sync for GroupKind
impl Unpin for GroupKind
impl UnsafeUnpin for GroupKind
impl UnwindSafe for GroupKind
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