pub struct PeerRegistryOptions {
pub eager_identity: bool,
pub eager_identity_concurrency: usize,
pub eager_identity_jitter_ms: u64,
}Expand description
Options for PeerRegistry::with_options.
Fields§
§eager_identity: boolWhen true (default), dial the envelope WS once per online peer to
learn durable identity without waiting for app send (RFC 022 §8).
eager_identity_concurrency: usizeMax concurrent eager-identity dials. Default: 4.
eager_identity_jitter_ms: u64Max per-peer delay (ms) applied before each EAGER identity dial to
stagger the first burst of hellos when a node joins a large mesh
(RFC 022 §8.1). The delay is a deterministic hash of the peer id in
0..eager_identity_jitter_ms (truffle-core has no rand dependency).
0 disables jitter — tests set it for deterministic timing. Only the
eager path is delayed; app send / ensure_ws_connected never wait.
Default: 250.
Trait Implementations§
Source§impl Clone for PeerRegistryOptions
impl Clone for PeerRegistryOptions
Source§fn clone(&self) -> PeerRegistryOptions
fn clone(&self) -> PeerRegistryOptions
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 PeerRegistryOptions
impl Debug for PeerRegistryOptions
Auto Trait Implementations§
impl Freeze for PeerRegistryOptions
impl RefUnwindSafe for PeerRegistryOptions
impl Send for PeerRegistryOptions
impl Sync for PeerRegistryOptions
impl Unpin for PeerRegistryOptions
impl UnsafeUnpin for PeerRegistryOptions
impl UnwindSafe for PeerRegistryOptions
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