pub struct DeviceFeature { /* private fields */ }Implementations§
Source§impl DeviceFeature
impl DeviceFeature
pub fn description(&self) -> &String
pub fn feature_type(&self) -> &FeatureType
pub fn actuator(&self) -> &Option<DeviceFeatureActuator>
pub fn sensor(&self) -> &Option<DeviceFeatureSensor>
pub fn raw(&self) -> &Option<DeviceFeatureRaw>
Source§impl DeviceFeature
impl DeviceFeature
pub fn new( description: &str, feature_type: FeatureType, actuator: &Option<DeviceFeatureActuator>, sensor: &Option<DeviceFeatureSensor>, ) -> Self
pub fn is_valid(&self) -> Result<(), ButtplugDeviceError>
pub fn new_raw_feature(endpoints: &[Endpoint]) -> Self
Trait Implementations§
Source§impl Clone for DeviceFeature
impl Clone for DeviceFeature
Source§fn clone(&self) -> DeviceFeature
fn clone(&self) -> DeviceFeature
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 DeviceFeature
impl Debug for DeviceFeature
Source§impl Default for DeviceFeature
impl Default for DeviceFeature
Source§fn default() -> DeviceFeature
fn default() -> DeviceFeature
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceFeature
impl<'de> Deserialize<'de> for DeviceFeature
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
Source§impl PartialEq for DeviceFeature
impl PartialEq for DeviceFeature
Source§impl Serialize for DeviceFeature
impl Serialize for DeviceFeature
impl Eq for DeviceFeature
impl StructuralPartialEq for DeviceFeature
Auto Trait Implementations§
impl Freeze for DeviceFeature
impl RefUnwindSafe for DeviceFeature
impl Send for DeviceFeature
impl Sync for DeviceFeature
impl Unpin for DeviceFeature
impl UnwindSafe for DeviceFeature
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