pub struct HeartbeatConfig {
pub interval: Duration,
pub tolerance: Duration,
pub handler: Option<Arc<dyn HeartbeatHandler>>,
}
Expand description
The heartbeat task configuration.
Fields§
§interval: Duration
The interval on which heartbeats will be sent.
tolerance: Duration
The amount of time past a missed heartbeat that the other side will be considered dead.
handler: Option<Arc<dyn HeartbeatHandler>>
An optional callback to run when a heartbeat is received.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HeartbeatConfig
impl !RefUnwindSafe for HeartbeatConfig
impl Send for HeartbeatConfig
impl Sync for HeartbeatConfig
impl Unpin 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