pub struct HapticFeedbackFeature { /* private fields */ }Expand description
Implements HapticFeedback / 0x19b0.
Implementations§
Source§impl HapticFeedbackFeature
impl HapticFeedbackFeature
Sourcepub async fn get_capabilities(&self) -> Result<HapticCapabilities, Hidpp20Error>
pub async fn get_capabilities(&self) -> Result<HapticCapabilities, Hidpp20Error>
Read the device’s supported waveform mask.
Sourcepub async fn get_configuration(
&self,
) -> Result<HapticConfiguration, Hidpp20Error>
pub async fn get_configuration( &self, ) -> Result<HapticConfiguration, Hidpp20Error>
Read whether haptics are enabled and their current intensity.
Sourcepub async fn set_configuration(
&self,
enabled: bool,
intensity: HapticIntensity,
) -> Result<(), Hidpp20Error>
pub async fn set_configuration( &self, enabled: bool, intensity: HapticIntensity, ) -> Result<(), Hidpp20Error>
Write the device-wide haptic enabled state and intensity.
Sourcepub async fn play(&self, waveform: HapticWaveform) -> Result<(), Hidpp20Error>
pub async fn play(&self, waveform: HapticWaveform) -> Result<(), Hidpp20Error>
Play one typed haptic waveform immediately.
Trait Implementations§
Source§impl Clone for HapticFeedbackFeature
impl Clone for HapticFeedbackFeature
Source§fn clone(&self) -> HapticFeedbackFeature
fn clone(&self) -> HapticFeedbackFeature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CreatableFeature for HapticFeedbackFeature
impl CreatableFeature for HapticFeedbackFeature
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
impl Feature for HapticFeedbackFeature
Auto Trait Implementations§
impl !RefUnwindSafe for HapticFeedbackFeature
impl !UnwindSafe for HapticFeedbackFeature
impl Freeze for HapticFeedbackFeature
impl Send for HapticFeedbackFeature
impl Sync for HapticFeedbackFeature
impl Unpin for HapticFeedbackFeature
impl UnsafeUnpin for HapticFeedbackFeature
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