[][src]Struct tari_comms::CommsNode

pub struct CommsNode { /* fields omitted */ }

CommsNode is a handle to a comms node.

It allows communication with the internals of tari_comms. Note that if this handle is dropped, tari_comms will shut down.

Implementations

impl CommsNode[src]

pub fn subscribe_connection_manager_events(
    &self
) -> Receiver<Arc<ConnectionManagerEvent>>
[src]

Get a subscription to ConnectionManagerEvents

pub fn subscribe_connectivity_events(&self) -> ConnectivityEventRx[src]

Get a subscription to ConnectivityEvents

pub fn peer_manager(&self) -> Arc<PeerManager>[src]

Return a cloned atomic reference of the PeerManager

pub fn node_identity(&self) -> Arc<NodeIdentity>[src]

Return a cloned atomic reference of the NodeIdentity

pub fn node_identity_ref(&self) -> &NodeIdentity[src]

Return a reference to the NodeIdentity

pub fn listening_address(&self) -> &Multiaddr[src]

Return the Ip/Tcp address that this node is listening on

pub fn hidden_service(&self) -> Option<&HiddenService>[src]

Return the Ip/Tcp address that this node is listening on

pub fn connection_manager(&self) -> ConnectionManagerRequester[src]

Return an owned copy of a ConnectionManagerRequester. Used to initiate connections to peers.

pub fn connectivity(&self) -> ConnectivityRequester[src]

Return an owned copy of a ConnectivityRequester. This is the async interface to the ConnectivityManager

pub fn shutdown_signal(&self) -> ShutdownSignal[src]

Returns a new ShutdownSignal

pub fn wait_until_shutdown(self) -> CommsShutdown[src]

Wait for comms to shutdown once the shutdown signal is triggered and for comms services to shut down. The object is consumed to ensure that no handles/channels are kept after shutdown

Trait Implementations

impl Clone for CommsNode[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, U> Cast<U> for T where
    U: FromCast<T>, 

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

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

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

impl<T> Instrument for T[src]

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

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,