Struct rust_gpiozero::input_devices::Button [] [src]

pub struct Button { /* fields omitted */ }

Represents a simple push button or switch. Connect one side of the button to a ground pin, and the other to any GPIO pin

Methods

impl Button
[src]

[src]

Create a new Button

[src]

Pause the script until the device is activated

[src]

Pause the script until the device is deactivated

Trait Implementations

impl Device for Button
[src]

[src]

Get the pin

[src]

Returns a value representing the device's state.

[src]

Shut down the device and release all associated resources.

[src]

Returns True if the device is currently active and Falseotherwise.

impl EventsTrait for Button
[src]

[src]

Pause the program until the device is activated

[src]

Pause the program until the device is deactivated

Auto Trait Implementations

impl Send for Button

impl Sync for Button