pub struct HeartbeatConfig {
pub path: PathBuf,
pub poll: Duration,
pub threshold: Duration,
}Expand description
A file another process rewrites as its heartbeat. The watch reads only its modification time, so the writer needs no protocol: a process that keeps touching the file is alive.
Fields§
§path: PathBufThe file the other process writes (for example a pid-scoped heartbeat in the app data
folder). It may be missing; see HeartbeatWatch.
poll: DurationHow often the file is looked at.
threshold: DurationAn age (time since the last write) at or above which the writer counts as stalled.
Trait Implementations§
Source§impl Clone for HeartbeatConfig
impl Clone for HeartbeatConfig
Auto Trait Implementations§
impl Freeze for HeartbeatConfig
impl RefUnwindSafe for HeartbeatConfig
impl Send for HeartbeatConfig
impl Sync for HeartbeatConfig
impl Unpin for HeartbeatConfig
impl UnsafeUnpin for HeartbeatConfig
impl UnwindSafe for HeartbeatConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more