mirror of
https://github.com/2e3s/awatcher.git
synced 2025-06-05 19:15:33 +00:00
15 lines
383 B
Rust
15 lines
383 B
Rust
use async_trait::async_trait;
|
|
use chrono::{DateTime, TimeDelta, Utc};
|
|
|
|
#[async_trait]
|
|
pub trait IdleSubscriber: Sync + Send {
|
|
async fn idle(
|
|
&self,
|
|
changed: bool,
|
|
last_input_time: DateTime<Utc>,
|
|
duration: TimeDelta,
|
|
) -> anyhow::Result<()>;
|
|
|
|
async fn non_idle(&self, changed: bool, last_input_time: DateTime<Utc>) -> anyhow::Result<()>;
|
|
}
|