pub struct EffectBuilder { /* fields omitted */ }
Creates new builder with following defaults: no gamepads, no base effects, repeat set to
infinitely, no distance model, position in (0.0, 0.0, 0.0) and gain 1.0. Use finish()
to
create new effect.
Changes gamepads that are associated with effect. Effect will be only played on gamepads
from last call to this function.
Adds gamepad to the list of gamepads associated with effect.
Changes what should happen to effect when it ends.
Changes distance model associated with effect.
Changes position of the source of effect.
Changes gain of the effect. gain
will be clamped to [0.0, f32::MAX].
Validates all parameters and creates new effect.
Returns Error::Disconnected(id)
or Error::FfNotSupported(id)
on first gamepad in ids
that is disconnected or doesn't support force feedback.
Returns Error::InvalidDistanceModel
if model
is not valid. See
DistanceModel
for details.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static