pub struct P2pConfig {
pub listen_address: SocketAddr,
pub public_address: Option<SocketAddr>,
pub max_inbound_peers: u32,
pub max_outbound_peers: u32,
pub enable_discovery: bool,
pub bootstrap_nodes: Vec<String>,
}Expand description
P2P network configuration
Fields§
§listen_address: SocketAddrListen address
public_address: Option<SocketAddr>Public address (for NAT traversal)
max_inbound_peers: u32Maximum inbound peers
max_outbound_peers: u32Maximum outbound peers
enable_discovery: boolEnable peer discovery
bootstrap_nodes: Vec<String>Bootstrap nodes
Trait Implementations§
Source§impl<'de> Deserialize<'de> for P2pConfig
impl<'de> Deserialize<'de> for P2pConfig
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
impl Eq for P2pConfig
impl StructuralPartialEq for P2pConfig
Auto Trait Implementations§
impl Freeze for P2pConfig
impl RefUnwindSafe for P2pConfig
impl Send for P2pConfig
impl Sync for P2pConfig
impl Unpin for P2pConfig
impl UnsafeUnpin for P2pConfig
impl UnwindSafe for P2pConfig
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