pub struct Ping { /* private fields */ }Expand description
Ping is a struct that holds both the client ping method, and the endpoint protocol implementation
Implementations§
Trait Implementations§
Source§impl ProtocolHandler for Ping
impl ProtocolHandler for Ping
Source§fn accept(&self, connection: Connection) -> BoxFuture<Result<()>>
fn accept(&self, connection: Connection) -> BoxFuture<Result<()>>
The accept method is called for each incoming connection for our ALPN.
The returned future runs on a newly spawned tokio task, so it can run as long as the connection lasts.
Source§fn on_connecting(
&self,
connecting: Connecting,
) -> Pin<Box<dyn Future<Output = Result<Connection, Error>> + Send>>
fn on_connecting( &self, connecting: Connecting, ) -> Pin<Box<dyn Future<Output = Result<Connection, Error>> + Send>>
Optional interception point to handle the
Connecting state. Read moreAuto Trait Implementations§
impl Freeze for Ping
impl RefUnwindSafe for Ping
impl Send for Ping
impl Sync for Ping
impl Unpin for Ping
impl UnwindSafe for Ping
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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