forked from sigil-03/power
code cleanup + add CLI bin
This commit is contained in:
parent
c5866eeccc
commit
230034c7f0
5 changed files with 64 additions and 7 deletions
|
|
@ -1,5 +1,8 @@
|
|||
use crate::types::{Error, PowerState};
|
||||
|
||||
pub trait Control {
|
||||
async fn set_power(&self, state: PowerState) -> Result<(), Error>;
|
||||
fn set_power(
|
||||
&self,
|
||||
state: PowerState,
|
||||
) -> impl std::future::Future<Output = Result<(), Error>> + Send;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue