[][src]Struct tari_comms::connection_manager::ConnectionManagerRequester

pub struct ConnectionManagerRequester { /* fields omitted */ }

Responsible for constructing requests to the ConnectionManagerService

Implementations

impl ConnectionManagerRequester[src]

pub fn new(
    sender: Sender<ConnectionManagerRequest>,
    event_tx: Sender<Arc<ConnectionManagerEvent>>
) -> Self
[src]

Create a new ConnectionManagerRequester

impl ConnectionManagerRequester[src]

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

Returns a new ConnectionManagerEvent subscription

pub async fn dial_peer(
    &mut self,
    node_id: NodeId
) -> Result<PeerConnection, ConnectionManagerError>
[src]

Attempt to connect to a remote peer

pub async fn cancel_dial(
    &mut self,
    node_id: NodeId
) -> Result<(), ConnectionManagerError>
[src]

Send instruction to ConnectionManager to dial a peer and return the result on the given oneshot

pub async fn wait_until_listening(
    &mut self
) -> Result<Multiaddr, ConnectionManagerError>
[src]

Return the listening address of this node's listener. This will asynchronously block until the listener has initialized and a listening address has been established.

This is useful when using "assigned port" addresses, such as /ip4/0.0.0.0/tcp/0 or /memory/0 for listening and you wish to know the final assigned port.

Trait Implementations

impl Clone for ConnectionManagerRequester[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>,