pub struct PeerConfig {
pub initial_reconnect_delay: Duration,
pub max_reconnect_delay: Duration,
pub max_queue_size: usize,
pub connection_timeout: Duration,
pub max_connection_failures: Option<u32>,
pub monitor: Option<MonitorConfig>,
}Expand description
Configuration for peer behavior and reconnection parameters.
Fields§
§initial_reconnect_delay: DurationInitial delay before attempting reconnection
max_reconnect_delay: DurationMaximum delay between reconnection attempts
max_queue_size: usizeMaximum number of messages to queue when disconnected
connection_timeout: DurationTimeout for connection attempts
max_connection_failures: Option<u32>Maximum number of consecutive connection failures before giving up None means unlimited retries
monitor: Option<MonitorConfig>Connection health monitoring configuration.
When Some, the peer periodically pings to detect unresponsive
connections (FDB connectionMonitor pattern). When None (default),
no active health monitoring is performed.
Only effective for outbound peers; incoming peers always respond to pings but never initiate them.
Trait Implementations§
Source§impl Clone for PeerConfig
impl Clone for PeerConfig
Source§fn clone(&self) -> PeerConfig
fn clone(&self) -> PeerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PeerConfig
impl Debug for PeerConfig
Source§impl Default for PeerConfig
impl Default for PeerConfig
Source§fn default() -> PeerConfig
fn default() -> PeerConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PeerConfig
impl RefUnwindSafe for PeerConfig
impl Send for PeerConfig
impl Sync for PeerConfig
impl Unpin for PeerConfig
impl UnsafeUnpin for PeerConfig
impl UnwindSafe for PeerConfig
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