pub struct ControllerCapabilities {
pub controller_type: String,
pub implementation: String,
pub vendor: Option<String>,
pub model: Option<String>,
pub firmware_version: Option<String>,
pub features: HashMap<String, bool>,
pub metadata: HashMap<String, String>,
}Expand description
Capabilities of a controller
Describes what features and operations a controller supports. This allows runtime capability detection and adaptation.
Fields§
§controller_type: StringController type identifier (e.g., “camera”, “imu”, “lidar”)
implementation: StringSpecific implementation (e.g., “realsense”, “bno055”, “rplidar”)
vendor: Option<String>Hardware vendor (e.g., “Intel”, “Bosch”, “Slamtec”)
model: Option<String>Hardware model (e.g., “D435i”, “BNO055”, “A2M8”)
firmware_version: Option<String>Firmware version if available
features: HashMap<String, bool>Feature flags indicating what operations are supported
metadata: HashMap<String, String>Additional metadata
Implementations§
Source§impl ControllerCapabilities
impl ControllerCapabilities
Sourcepub fn new(
controller_type: impl Into<String>,
implementation: impl Into<String>,
) -> Self
pub fn new( controller_type: impl Into<String>, implementation: impl Into<String>, ) -> Self
Create a new capabilities struct
Sourcepub fn with_feature(self, name: impl Into<String>, supported: bool) -> Self
pub fn with_feature(self, name: impl Into<String>, supported: bool) -> Self
Add a feature flag
Sourcepub fn with_metadata(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add metadata
Sourcepub fn with_vendor(self, vendor: impl Into<String>) -> Self
pub fn with_vendor(self, vendor: impl Into<String>) -> Self
Set vendor
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Set model
Trait Implementations§
Source§impl Clone for ControllerCapabilities
impl Clone for ControllerCapabilities
Source§fn clone(&self) -> ControllerCapabilities
fn clone(&self) -> ControllerCapabilities
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 ControllerCapabilities
impl Debug for ControllerCapabilities
Source§impl<'de> Deserialize<'de> for ControllerCapabilities
impl<'de> Deserialize<'de> for ControllerCapabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ControllerCapabilities
impl RefUnwindSafe for ControllerCapabilities
impl Send for ControllerCapabilities
impl Sync for ControllerCapabilities
impl Unpin for ControllerCapabilities
impl UnwindSafe for ControllerCapabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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