pub struct PeerLifetimeConfig {
pub disconnected_timeout: Duration,
pub connected_timeout: Duration,
pub cleanup_interval: Duration,
}Expand description
Configuration for peer lifetime management
Fields§
§disconnected_timeout: DurationTimeout for disconnected peers (default: 30 seconds) Peers that have been disconnected for longer than this are considered stale
connected_timeout: DurationTimeout for connected peers (default: 60 seconds) Connected peers that haven’t had activity for longer than this are considered stale (handles ghost connections where disconnect was missed)
cleanup_interval: DurationInterval for cleanup checks (default: 10 seconds)
Implementations§
Trait Implementations§
Source§impl Clone for PeerLifetimeConfig
impl Clone for PeerLifetimeConfig
Source§fn clone(&self) -> PeerLifetimeConfig
fn clone(&self) -> PeerLifetimeConfig
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 PeerLifetimeConfig
impl Debug for PeerLifetimeConfig
Auto Trait Implementations§
impl Freeze for PeerLifetimeConfig
impl RefUnwindSafe for PeerLifetimeConfig
impl Send for PeerLifetimeConfig
impl Sync for PeerLifetimeConfig
impl Unpin for PeerLifetimeConfig
impl UnsafeUnpin for PeerLifetimeConfig
impl UnwindSafe for PeerLifetimeConfig
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