Struct gilrs::ff::Effect [] [src]

pub struct Effect { /* fields omitted */ }

Handle to force feedback effect.

Effect represents force feedback effect that can be played on one or more gamepads. It uses a form of reference counting, so it can be cheaply cloned. To create new Effect use EffectBuilder.

All methods on can return Error::SendFailed although it shouldn't normally happen.

Methods

impl Effect
[src]

[src]

Plays effect on all associated gamepads.

[src]

Changes gamepads that are associated with effect. Effect will be only played on gamepads from last call to this function.

Errors

Returns Error::Disconnected(id) or Error::FfNotSupported(id) on first gamepad in ids that is disconnected or doesn't support force feedback.

[src]

Adds gamepad to the list of gamepads associated with effect.

Errors

Returns Error::Disconnected(id) or Error::FfNotSupported(id) if gamepad is not connected or does not support force feedback.

[src]

Changes what should happen to effect when it ends.

[src]

Changes distance model associated with effect.

Errors

Returns Error::InvalidDistanceModel if model is not valid. See DistanceModel for details.

[src]

Changes position of the source of effect.

[src]

Changes gain of the effect. gain will be clamped to [0.0, f32::MAX].

Trait Implementations

impl PartialEq for Effect
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for Effect
[src]

impl Hash for Effect
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for Effect
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Drop for Effect
[src]

[src]

Executes the destructor for this type. Read more