pub struct JoinOptions {
pub bootstrap: BTreeSet<NodeId>,
pub subscription_capacity: usize,
}
Available on crate feature
net
only.Expand description
Options for joining a gossip topic.
Fields§
§bootstrap: BTreeSet<NodeId>
The initial bootstrap nodes.
subscription_capacity: usize
The maximum number of messages that can be buffered in a subscription.
If this limit is reached, the subscriber will receive a Lagged
response,
the message will be dropped, and the subscriber will be closed.
This is to prevent a single slow subscriber from blocking the dispatch loop. If a subscriber is lagging, it should be closed and re-opened.
Implementations§
Source§impl JoinOptions
impl JoinOptions
Sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
pub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions
with the provided bootstrap nodes and the default subscription
capacity.
Trait Implementations§
Source§impl Debug for JoinOptions
impl Debug for JoinOptions
Source§impl<'de> Deserialize<'de> for JoinOptions
impl<'de> Deserialize<'de> for JoinOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for JoinOptions
impl RefUnwindSafe for JoinOptions
impl Send for JoinOptions
impl Sync for JoinOptions
impl Unpin for JoinOptions
impl UnwindSafe for JoinOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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