Trait rust_gpiozero::traits::EventsTrait
[−]
[src]
pub trait EventsTrait: Device { fn wait_for_active(&self) { ... } fn wait_for_inactive(&self) { ... } }
Adds edge-detected when_activated
and when_deactivated
events to a device based on changes to the is_active
property common to all devices.
Provided Methods
fn wait_for_active(&self)
Pause the program until the device is activated
fn wait_for_inactive(&self)
Pause the program until the device is deactivated
Implementors
impl EventsTrait for DigitalInputDevice
impl EventsTrait for Button