[][src]Struct safe_core::ConnectionManager

pub struct ConnectionManager { /* fields omitted */ }

Initialises QuicP2p instance. Establishes new connections. Contains a reference to crossbeam channel provided by quic-p2p for capturing the events.

Methods

impl ConnectionManager[src]

pub fn new(config: QuicP2pConfig, net_tx: &NetworkTx) -> Result<Self, CoreError>[src]

Create a new connection manager.

pub fn has_connection_to(&self, pub_id: &PublicId) -> bool[src]

Returns true if this connection manager is already connected to a Client Handlers group serving the provided public ID.

pub fn send(
    &mut self,
    pub_id: &PublicId,
    msg: &Message
) -> Box<CoreFuture<Response>>
[src]

Send message via the ConnectionGroup specified by our given pub_id.

pub fn bootstrap(&mut self, full_id: SafeKey) -> Box<CoreFuture<()>>[src]

Connect to Client Handlers that manage the provided ID.

pub fn restart_network(&mut self)[src]

Reconnect to the network.

pub fn disconnect(&mut self, pub_id: &PublicId) -> Box<CoreFuture<()>>[src]

Disconnect from a group.

Trait Implementations

impl Clone for ConnectionManager[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<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> CloneAny for T where
    T: Clone + Any

impl<T> UnsafeAny for T where
    T: Any

impl<T> Erased for T