Trait esp32_simple::infra::Switch
source · pub trait Switch {
// Required method
fn toggle(&mut self) -> Result<()>;
}Expand description
A trait representing a switch that can toggle its state.
§Errors
This trait’s toggle method returns an error if the toggle operation fails.