[][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.

Implementations

impl ConnectionManager[src]

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

Create a new connection manager.

pub async 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 async fn send<'_, '_, '_>(
    &'_ mut self,
    pub_id: &'_ PublicId,
    msg: &'_ Message
) -> Result<Response, CoreError>
[src]

Send message via the ConnectionGroup specified by our given pub_id.

pub async fn bootstrap<'_>(
    &'_ mut self,
    full_id: SafeKey
) -> Result<(), CoreError>
[src]

Connect to Client Handlers that manage the provided ID.

pub fn restart_network(&mut self)[src]

Reconnect to the network.

pub async fn disconnect<'_, '_>(
    &'_ mut self,
    pub_id: &'_ PublicId
) -> Result<(), CoreError>
[src]

Disconnect from a group.

Trait Implementations

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

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

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

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<T> UnsafeAny for T where
    T: Any

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