automation_rs/src/traits.rs
Dreaded_X 668f13863a
Replaced impl_cast with a new and improved trait
With this trait the impl_cast macros are no longer needed, simplifying
everything.
This commit also improved how the actual casting itself is handled.
2024-05-05 02:01:13 +02:00

11 lines
252 B
Rust

use std::time::Duration;
use anyhow::Result;
use async_trait::async_trait;
#[async_trait]
pub trait Timeout: Sync + Send {
async fn start_timeout(&mut self, _timeout: Duration) -> Result<()>;
async fn stop_timeout(&mut self) -> Result<()>;
}