pub trait IPeerConnections<M>{
// Required methods
fn send<'life0, 'async_trait>(
&'life0 mut self,
recipient: Recipient,
msg: M,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn try_send(&self, recipient: Recipient, msg: M);
fn receive<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<(PeerId, M)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_dyn(self) -> PeerConnections<M>
where Self: Sized + Send + 'static { ... }
}
Expand description
Connection manager that tries to keep connections open to all peers
Required Methods§
Sourcefn send<'life0, 'async_trait>(
&'life0 mut self,
recipient: Recipient,
msg: M,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 mut self,
recipient: Recipient,
msg: M,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send message to recipient; block if channel is full.
Provided Methods§
Sourcefn into_dyn(self) -> PeerConnections<M>
fn into_dyn(self) -> PeerConnections<M>
Converts the struct to a PeerConnection
trait object