pub struct KeepaliveConfig {
pub ping_interval_percent: u8,
pub timeout_percent: u8,
}Fields§
§ping_interval_percent: u8§timeout_percent: u8Implementations§
Source§impl KeepaliveConfig
impl KeepaliveConfig
pub const fn new(ping_interval_percent: u8, timeout_percent: u8) -> Self
pub const fn conservative() -> Self
pub fn ping_interval(&self, keepalive: Duration) -> Duration
pub fn timeout_duration(&self, keepalive: Duration) -> Duration
Trait Implementations§
Source§impl Clone for KeepaliveConfig
impl Clone for KeepaliveConfig
Source§fn clone(&self) -> KeepaliveConfig
fn clone(&self) -> KeepaliveConfig
Returns a duplicate 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 KeepaliveConfig
impl Debug for KeepaliveConfig
Source§impl Default for KeepaliveConfig
impl Default for KeepaliveConfig
Source§impl PartialEq for KeepaliveConfig
impl PartialEq for KeepaliveConfig
impl Copy for KeepaliveConfig
impl Eq for KeepaliveConfig
impl StructuralPartialEq for KeepaliveConfig
Auto Trait Implementations§
impl Freeze for KeepaliveConfig
impl RefUnwindSafe for KeepaliveConfig
impl Send for KeepaliveConfig
impl Sync for KeepaliveConfig
impl Unpin for KeepaliveConfig
impl UnwindSafe for KeepaliveConfig
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