Enum rich_sdl2_rust::haptic::effect::HapticEffect
source · #[non_exhaustive]pub enum HapticEffect {
Constant(Direction, Play, Trigger, Level, Envelope),
Periodic(Direction, Play, Trigger, Wave, Envelope),
Condition(Play, Trigger, Condition),
Ramp(Direction, Play, Trigger, Ramp, Envelope),
LeftRight {
length: u32,
large_magnitude: u16,
small_magnitude: u16,
},
Custom(Direction, Play, Trigger, Custom, Envelope),
}
Expand description
An effect on the haptic device.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Constant(Direction, Play, Trigger, Level, Envelope)
Applies the constant force in the direction.
Periodic(Direction, Play, Trigger, Wave, Envelope)
Applies the force of the periodic waveform.
Condition(Play, Trigger, Condition)
Applies the force on fulfilled the condition.
Ramp(Direction, Play, Trigger, Ramp, Envelope)
Applies the force by linear ramp.
LeftRight
Fields
Applies the left/right effect with two motors magnitude. One motor is high frequency, the other is low frequency.
Custom(Direction, Play, Trigger, Custom, Envelope)
Applies the force of the periodic waveform from your sampled data.
Trait Implementations§
source§impl Clone for HapticEffect
impl Clone for HapticEffect
source§fn clone(&self) -> HapticEffect
fn clone(&self) -> HapticEffect
Returns a copy 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 HapticEffect
impl Debug for HapticEffect
source§impl From<SDL_HapticEffect> for HapticEffect
impl From<SDL_HapticEffect> for HapticEffect
source§impl PartialEq for HapticEffect
impl PartialEq for HapticEffect
source§fn eq(&self, other: &HapticEffect) -> bool
fn eq(&self, other: &HapticEffect) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HapticEffect
impl StructuralPartialEq for HapticEffect
Auto Trait Implementations§
impl RefUnwindSafe for HapticEffect
impl Send for HapticEffect
impl Sync for HapticEffect
impl Unpin for HapticEffect
impl UnwindSafe for HapticEffect
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