pub struct NetworkConfig {
pub node_type: NodeType,
pub listen_addresses: Vec<String>,
pub external_addresses: Vec<String>,
pub boot_nodes: Vec<RoutingNode>,
pub routing: Config,
pub control_list: Config,
pub memory_limits: MemoryLimitsConfig,
pub max_app_message_bytes: usize,
pub max_pending_outbound_bytes_per_peer: usize,
pub max_pending_inbound_bytes_per_peer: usize,
pub max_pending_outbound_bytes_total: usize,
pub max_pending_inbound_bytes_total: usize,
}Expand description
Network config
Fields§
§node_type: NodeTypeThe node type.
listen_addresses: Vec<String>Listen addresses.
external_addresses: Vec<String>External addresses.
boot_nodes: Vec<RoutingNode>Bootnodes to connect to.
routing: ConfigRouting configuration.
control_list: ConfigControl List configuration.
memory_limits: MemoryLimitsConfigMemory-based connection limit policy.
max_app_message_bytes: usizeMaximum accepted application message payload in bytes.
max_pending_outbound_bytes_per_peer: usizeMaximum buffered outbound bytes per peer while disconnected.
0 disables the per-peer bytes limit.
max_pending_inbound_bytes_per_peer: usizeMaximum buffered inbound bytes per peer before helper delivery.
0 disables the per-peer bytes limit.
max_pending_outbound_bytes_total: usizeMaximum total buffered outbound bytes across all peers while disconnected.
0 disables the global bytes limit.
max_pending_inbound_bytes_total: usizeMaximum total buffered inbound bytes across all peers before helper delivery.
0 disables the global bytes limit.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Config
impl Serialize for Config
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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