Struct rich_sdl2_rust::haptic::JoystickHaptic
source · pub struct JoystickHaptic<'joystick> { /* private fields */ }
Expand description
A haptic device got from the joystick.
Implementations§
Methods from Deref<Target = Haptic>§
sourcepub fn is_effect_supported(&self, effect: &HapticEffect) -> bool
pub fn is_effect_supported(&self, effect: &HapticEffect) -> bool
Returns whether the effect is supported on the haptic device.
sourcepub fn new_effect(&self, effect: &HapticEffect) -> Result<PendingEffect<'_>>
pub fn new_effect(&self, effect: &HapticEffect) -> Result<PendingEffect<'_>>
Constructs the PendingEffect
from the effect specification.
§Errors
Returns Err
if this feature is unsupported, or failed to create a new haptic effect on the device.
sourcepub fn effects_creation_capacity(&self) -> usize
pub fn effects_creation_capacity(&self) -> usize
Returns the capacity of the effects on the haptic device.
sourcepub fn effects_playing_capacity(&self) -> usize
pub fn effects_playing_capacity(&self) -> usize
Returns the maximum numbers of playing the effects at same time on the haptic device.
sourcepub fn stop_all_effect(&self)
pub fn stop_all_effect(&self)
Stops all the playing effect.
sourcepub fn set_auto_center(&self, auto_center: u32)
pub fn set_auto_center(&self, auto_center: u32)
Sets auto-center. If not supported, this has no effects.
sourcepub fn property(&self) -> HapticProperty
pub fn property(&self) -> HapticProperty
Queries a property on the haptic device.
Trait Implementations§
source§impl Debug for JoystickHaptic<'_>
impl Debug for JoystickHaptic<'_>
source§impl Deref for JoystickHaptic<'_>
impl Deref for JoystickHaptic<'_>
Auto Trait Implementations§
impl<'joystick> RefUnwindSafe for JoystickHaptic<'joystick>
impl<'joystick> !Send for JoystickHaptic<'joystick>
impl<'joystick> !Sync for JoystickHaptic<'joystick>
impl<'joystick> Unpin for JoystickHaptic<'joystick>
impl<'joystick> UnwindSafe for JoystickHaptic<'joystick>
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