pub struct RobotBuilder { /* private fields */ }Expand description
Builder for Robot.
Implementations§
Source§impl RobotBuilder
impl RobotBuilder
Sourcepub fn add_bus(
self,
name: impl Into<String>,
transport: Box<dyn CanBus>,
codec: Box<dyn MotorCodec>,
) -> Self
pub fn add_bus( self, name: impl Into<String>, transport: Box<dyn CanBus>, codec: Box<dyn MotorCodec>, ) -> Self
Register a bus with its transport and vendor codec. The codec’s
bind_to_bus(transport.capabilities()) is invoked exactly once here.
Sourcepub fn add_arm(
self,
name: impl Into<String>,
bus_name: impl Into<String>,
motors: Vec<MotorSpec>,
) -> Self
pub fn add_arm( self, name: impl Into<String>, bus_name: impl Into<String>, motors: Vec<MotorSpec>, ) -> Self
Register an arm group.
Sourcepub fn add_gripper(
self,
name: impl Into<String>,
bus_name: impl Into<String>,
motor: MotorSpec,
) -> Self
pub fn add_gripper( self, name: impl Into<String>, bus_name: impl Into<String>, motor: MotorSpec, ) -> Self
Register a one-motor gripper. Validation enforces the one-motor rule
at build() time.
Sourcepub fn add_gripper_with_opening(
self,
name: impl Into<String>,
bus_name: impl Into<String>,
motor: MotorSpec,
opening: GripperOpeningSpec,
) -> Self
pub fn add_gripper_with_opening( self, name: impl Into<String>, bus_name: impl Into<String>, motor: MotorSpec, opening: GripperOpeningSpec, ) -> Self
Register a one-motor gripper with normalized opening support.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RobotBuilder
impl !RefUnwindSafe for RobotBuilder
impl Send for RobotBuilder
impl !Sync for RobotBuilder
impl Unpin for RobotBuilder
impl UnsafeUnpin for RobotBuilder
impl !UnwindSafe for RobotBuilder
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