pub struct PeripheralClient { /* private fields */ }Expand description
ctx.peripheral_manager — register driver instances and claim cameras.
A driver is registered by an opaque reference id; the driver itself keeps
running in the plugin process. The host records the claim and routes the
driver kind through its registry. This mirrors _driver_ref: the host never
sees the live driver object. Each kind needs the catalog cap from
crate::client::driver_kind_capability. A host with no consumer for
registered drivers answers not_implemented, surfaced as ClientError::Rpc.
Implementations§
Source§impl PeripheralClient
impl PeripheralClient
pub async fn register_camera_driver( &self, driver_ref: &str, ) -> Result<Value, ClientError>
pub async fn register_lidar_driver( &self, driver_ref: &str, ) -> Result<Value, ClientError>
pub async fn register_gimbal_driver( &self, driver_ref: &str, ) -> Result<Value, ClientError>
pub async fn register_gps_driver( &self, driver_ref: &str, ) -> Result<Value, ClientError>
pub async fn register_esc_driver( &self, driver_ref: &str, ) -> Result<Value, ClientError>
pub async fn register_payload_actuator_driver( &self, driver_ref: &str, ) -> Result<Value, ClientError>
Sourcepub async fn unregister(&self, handle_id: &str) -> Result<Value, ClientError>
pub async fn unregister(&self, handle_id: &str) -> Result<Value, ClientError>
Release a previously-registered driver by handle.
Sourcepub async fn claim_camera(
&self,
device_path: &str,
exclusive: bool,
) -> Result<Value, ClientError>
pub async fn claim_camera( &self, device_path: &str, exclusive: bool, ) -> Result<Value, ClientError>
Claim a camera device path, optionally exclusive.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PeripheralClient
impl !UnwindSafe for PeripheralClient
impl Freeze for PeripheralClient
impl Send for PeripheralClient
impl Sync for PeripheralClient
impl Unpin for PeripheralClient
impl UnsafeUnpin for PeripheralClient
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