pub trait StatefulOutputSwitch {
type Error;
// Required methods
fn is_on(&mut self) -> Result<bool, Self::Error>;
fn is_off(&mut self) -> Result<bool, Self::Error>;
}Expand description
Checks current switch state
§Notes
This is only available if the underlying hal has implemented StatefulOutputPin
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".