pub struct System { /* private fields */ }
Expand description

Contains the setup for a particular application.

Implementations

Adds an amount of users to the system, connecting any unassigned devices to the new users as available.

Adds an action to the list of actions the system supports.

Adds a layout to the list of layouts the system supports.

Associates an action set with an id.

Sets the layout of a user. If not called, all user’s start with a None layout (default layout).

Enables and disables a provided action set for a given user. When enabled, a user will receive input events for the actions in the action set, until the set is disabled (or until System::update stops being called).

Enables an action set for all existing users. See System::mark_action_set_enabled for further details.

Sends an input event to the system. Use with caution! Gamepad events are already handled/built-in, but Mouse and Keyboard events should come from the relevant feature/extension (like winit).

Collects gamepad input and updates relevant actions.

Returns a list of active user ids.

Returns the state for an action on a given user. If the action is invalid or is not enabled for the user’s layout or list of enabled action sets, None will be returned.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.