[][src]Trait rust_gpiozero::devices::Device

pub trait Device {
    fn close(self);
fn is_active(&self) -> bool; }

Represents a single device of any type; GPIO-based, SPI-based, I2C-based, etc. It defines the basic services applicable to all devices

Required methods

fn close(self)

Shut down the device and release all associated resources.

fn is_active(&self) -> bool

Returns True if the device is currently active and False otherwise.

Loading content...

Implementors

Loading content...