[][src]Struct pea2pea::NodeConfig

pub struct NodeConfig {
    pub name: Option<String>,
    pub desired_listening_port: Option<u16>,
    pub allow_random_port: bool,
    pub reading_handler_queue_depth: usize,
    pub writing_handler_queue_depth: usize,
    pub conn_read_buffer_size: usize,
    pub conn_write_buffer_size: usize,
    pub conn_inbound_queue_depth: usize,
    pub conn_outbound_queue_depth: usize,
    pub invalid_message_penalty_secs: u64,
    pub max_connections: u16,
}

The node's configuration.

Fields

name: Option<String>

The name/identifier of the node.

desired_listening_port: Option<u16>

The desired listening port of the node.

allow_random_port: bool

Allow listening on a different port if desired_listening_port is unavailable.

reading_handler_queue_depth: usize

The depth of the queue passing connection objects to the reading handler.

writing_handler_queue_depth: usize

The depth of the queue passing connection objects to the writing handler.

conn_read_buffer_size: usize

The size of a per-connection buffer for reading inbound messages.

conn_write_buffer_size: usize

The size of a per-connection buffer for writing outbound messages.

conn_inbound_queue_depth: usize

The depth of per-connection queues used to process inbound messages.

conn_outbound_queue_depth: usize

The depth of per-connection queues used to send outbound messages.

invalid_message_penalty_secs: u64

The delay on the next read from a node that provided an invalid message.

max_connections: u16

The maximum number of active connections the node can maintain.

Trait Implementations

impl Clone for NodeConfig[src]

impl Debug for NodeConfig[src]

impl Default for NodeConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.