Api

Trait Api 

Source
pub trait Api: Support<usize> + Send {
    // Required methods
    fn get(led: Id<Self>) -> Result<bool, Error>;
    fn set(led: Id<Self>, on: bool) -> Result<(), Error>;
}
Available on crate feature api-led only.
Expand description

LED interface.

Required Methods§

Source

fn get(led: Id<Self>) -> Result<bool, Error>

Returns whether a given LED is on.

Source

fn set(led: Id<Self>, on: bool) -> Result<(), Error>

Sets the state of a given LED.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§