[][src]Struct nimiq_network::connection::connection_pool::ConnectionPoolState

pub struct ConnectionPoolState {
    pub peer_count_ws: usize,
    pub peer_count_wss: usize,
    pub connecting_count: usize,
    pub allow_inbound_connections: bool,
    pub allow_inbound_exchange: bool,
    // some fields omitted
}

Fields

peer_count_ws: usizepeer_count_wss: usizeconnecting_count: usizeallow_inbound_connections: boolallow_inbound_exchange: bool

Methods

impl ConnectionPoolState[src]

pub fn connection_iter(&self) -> Vec<&ConnectionInfo>[src]

pub fn id_and_connection_iter(&self) -> Vec<(ConnectionId, &ConnectionInfo)>[src]

pub fn get_connection_by_peer_address(
    &self,
    peer_address: &PeerAddress
) -> Option<&ConnectionInfo>
[src]

Get the connection info for a peer address.

pub fn get_connection_id_by_peer_address(
    &self,
    peer_address: &PeerAddress
) -> Option<ConnectionId>
[src]

pub fn get_connection_by_peer_address_mut(
    &mut self,
    peer_address: &PeerAddress
) -> Option<&mut ConnectionInfo>
[src]

Get the connection info for a peer address as a mutable borrow.

pub fn get_connection(
    &self,
    connection_id: ConnectionId
) -> Option<&ConnectionInfo>
[src]

Get the connection info for a ConnectionId.

pub fn get_connections_by_net_address(
    &self,
    net_address: &NetAddress
) -> Option<Vec<&ConnectionInfo>>
[src]

Get a list of connection info for a net address.

pub fn get_num_connections_by_net_address(
    &self,
    net_address: &NetAddress
) -> usize
[src]

Get the number of connections for a net address.

pub fn get_connections_by_subnet(
    &self,
    net_address: &NetAddress
) -> Option<Vec<&ConnectionInfo>>
[src]

Get a list of connection info for a subnet.

pub fn get_num_connections_by_subnet(&self, net_address: &NetAddress) -> usize[src]

Get the number of connections for a subnet.

pub fn get_outbound_connections_by_subnet(
    &self,
    net_address: &NetAddress
) -> Option<Vec<&ConnectionInfo>>
[src]

Retrieve a list of connection info for all outbound connections into a subnet.

pub fn get_num_outbound_connections_by_subnet(
    &self,
    net_address: &NetAddress
) -> usize
[src]

Retrieve the number of connections for all outbound connections into a subnet.

pub fn peer_count(&self) -> usize[src]

Total peer count.

pub fn get_peer_count_full_ws_outbound(&self) -> usize[src]

pub fn get_peer_count_outbound(&self) -> usize[src]

pub fn count(&self) -> usize[src]

Auto Trait Implementations

Blanket Implementations

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

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

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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