pub struct MonitorSettings {
pub activity_timeout: Duration,
pub ping_timeout: Duration,
}
Expand description
These settings tell the monitor how to behave.
They allow you to configure the amount of time between the steps.
Fields§
§activity_timeout: Duration
Amount of time since the last activity.
When the amount of time since the last activity gets higher than this value, tt will trigger a ping request. If there is not a lot of activity, this means that the server will be pinged everytime this duration expires.
ping_timeout: Duration
Amount of time to wait for a ping reply.
When the amount of time since the ping was sent gets higher than this value, and that no activity occured, assume the connection was dropped and trigger and a disconnect.
Trait Implementations§
Source§impl Clone for MonitorSettings
impl Clone for MonitorSettings
Source§fn clone(&self) -> MonitorSettings
fn clone(&self) -> MonitorSettings
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MonitorSettings
impl Debug for MonitorSettings
Source§impl Default for MonitorSettings
Default values are provided for the settings.
impl Default for MonitorSettings
Default values are provided for the settings.
They are:
activity_timeout
= 60 seconds
ping_timeout
= 15 seconds
Source§fn default() -> MonitorSettings
fn default() -> MonitorSettings
Returns the “default value” for a type. Read more
Source§impl PartialEq for MonitorSettings
impl PartialEq for MonitorSettings
impl Copy for MonitorSettings
impl Eq for MonitorSettings
impl StructuralPartialEq for MonitorSettings
Auto Trait Implementations§
impl Freeze for MonitorSettings
impl RefUnwindSafe for MonitorSettings
impl Send for MonitorSettings
impl Sync for MonitorSettings
impl Unpin for MonitorSettings
impl UnwindSafe for MonitorSettings
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