pub struct Effect<'a> { /* private fields */ }Expand description
A force-feedback effect description.
Primarily created from the more specific force-feedback types in this module using From.
The 'a lifetime is only used for Periodic effects with Waveform::CUSTOM (created via
Periodic::custom).
It can be 'static for all other effects.
Implementations§
Source§impl Effect<'_>
impl Effect<'_>
pub fn with_direction(self, dir: u16) -> Self
pub fn with_trigger(self, trigger: Trigger) -> Self
pub fn effect_type(&self) -> EffectType
pub fn with_replay(self, replay: Replay) -> Self
pub fn id(&self) -> EffectId
pub fn direction(&self) -> u16
pub fn trigger(&self) -> Trigger
pub fn replay(&self) -> Replay
pub fn kind(&self) -> Option<EffectKind<'_>>
Trait Implementations§
Source§impl<'a> From<EffectKind<'a>> for Effect<'a>
impl<'a> From<EffectKind<'a>> for Effect<'a>
Source§fn from(value: EffectKind<'a>) -> Self
fn from(value: EffectKind<'a>) -> Self
Converts to this type from the input type.
impl<'a> Copy for Effect<'a>
Auto Trait Implementations§
impl<'a> Freeze for Effect<'a>
impl<'a> RefUnwindSafe for Effect<'a>
impl<'a> Send for Effect<'a>
impl<'a> Sync for Effect<'a>
impl<'a> Unpin for Effect<'a>
impl<'a> UnwindSafe for Effect<'a>
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