pub struct PingPongProtocol {}Expand description
A sync implementation where the initiator sends a ping message and the acceptor responds with
a pong message.
Trait Implementations§
Source§impl Clone for PingPongProtocol
impl Clone for PingPongProtocol
Source§fn clone(&self) -> PingPongProtocol
fn clone(&self) -> PingPongProtocol
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PingPongProtocol
impl Debug for PingPongProtocol
Source§impl<'a> SyncProtocol<'a, SyncTestTopic> for PingPongProtocol
impl<'a> SyncProtocol<'a, SyncTestTopic> for PingPongProtocol
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Custom identifier for this sync protocol implementation. Read more
Source§fn initiate<'async_trait>(
self: Arc<Self>,
topic_query: SyncTestTopic,
tx: Box<&'a mut (dyn AsyncWrite + Send + Unpin)>,
rx: Box<&'a mut (dyn AsyncRead + Send + Unpin)>,
app_tx: Box<&'a mut (dyn Sink<FromSync<SyncTestTopic>, Error = SyncError> + Send + Unpin)>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn initiate<'async_trait>(
self: Arc<Self>,
topic_query: SyncTestTopic,
tx: Box<&'a mut (dyn AsyncWrite + Send + Unpin)>,
rx: Box<&'a mut (dyn AsyncRead + Send + Unpin)>,
app_tx: Box<&'a mut (dyn Sink<FromSync<SyncTestTopic>, Error = SyncError> + Send + Unpin)>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Initiate a sync protocol session over the provided bi-directional stream for the given
topic query. Read more
Source§fn accept<'async_trait>(
self: Arc<Self>,
tx: Box<&'a mut (dyn AsyncWrite + Send + Unpin)>,
rx: Box<&'a mut (dyn AsyncRead + Send + Unpin)>,
app_tx: Box<&'a mut (dyn Sink<FromSync<SyncTestTopic>, Error = SyncError> + Send + Unpin)>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn accept<'async_trait>(
self: Arc<Self>,
tx: Box<&'a mut (dyn AsyncWrite + Send + Unpin)>,
rx: Box<&'a mut (dyn AsyncRead + Send + Unpin)>,
app_tx: Box<&'a mut (dyn Sink<FromSync<SyncTestTopic>, Error = SyncError> + Send + Unpin)>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Accept a sync protocol session over the provided bi-directional stream. Read more
Auto Trait Implementations§
impl Freeze for PingPongProtocol
impl RefUnwindSafe for PingPongProtocol
impl Send for PingPongProtocol
impl Sync for PingPongProtocol
impl Unpin for PingPongProtocol
impl UnwindSafe for PingPongProtocol
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more