[][src]Struct nimiq_network::network::Network

pub struct Network {
    pub network_config: Arc<NetworkConfig>,
    pub network_time: Arc<NetworkTime>,
    pub addresses: Arc<PeerAddressBook>,
    pub connections: Arc<ConnectionPool>,
    pub notifier: RwLock<PassThroughNotifier<'static, NetworkEvent>>,
    // some fields omitted
}

Fields

network_config: Arc<NetworkConfig>network_time: Arc<NetworkTime>addresses: Arc<PeerAddressBook>connections: Arc<ConnectionPool>notifier: RwLock<PassThroughNotifier<'static, NetworkEvent>>

Methods

impl Network[src]

pub const SIGNALING_ENABLED: bool[src]

pub fn new(
    blockchain: Arc<Blockchain<'static>>,
    network_config: NetworkConfig,
    network_time: Arc<NetworkTime>,
    network_id: NetworkId
) -> Result<Arc<Self>, Error>
[src]

pub fn initialize(&self) -> Result<(), Error>[src]

pub fn connect(&self) -> Result<(), Error>[src]

pub fn disconnect(&self)[src]

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

pub fn set_allow_inbound_connections(&self, allow_inbound_connections: bool)[src]

pub fn scorer(&self) -> RwLockReadGuard<PeerScorer>[src]

Auto Trait Implementations

impl Send for Network

impl Sync for Network

impl Unpin for Network

impl !UnwindSafe for Network

impl !RefUnwindSafe for Network

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