pub struct SetConfig {
pub in_peers: u32,
pub out_peers: u32,
pub bootnodes: Vec<PeerId>,
pub reserved_nodes: HashSet<PeerId>,
pub reserved_only: bool,
}Expand description
Configuration for a single set of nodes.
Fields§
§in_peers: u32Maximum number of ingoing links to peers.
out_peers: u32Maximum number of outgoing links to peers.
bootnodes: Vec<PeerId>List of bootstrap nodes to initialize the set with.
Note: Keep in mind that the networking has to know an address for these nodes, otherwise it will not be able to connect to them.
reserved_nodes: HashSet<PeerId>Lists of nodes we should always be connected to.
Note: Keep in mind that the networking has to know an address for these nodes, otherwise it will not be able to connect to them.
reserved_only: boolIf true, we only accept nodes in SetConfig::reserved_nodes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetConfig
impl RefUnwindSafe for SetConfig
impl Send for SetConfig
impl Sync for SetConfig
impl Unpin for SetConfig
impl UnwindSafe for SetConfig
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more