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§async fn accept(&self, connection: Connection) -> Result<(), AcceptError>
async fn accept(&self, connection: Connection) -> Result<(), AcceptError>
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,
) -> impl Future<Output = Result<Connection, AcceptError>> + Send
fn on_connecting( &self, connecting: Connecting, ) -> impl Future<Output = Result<Connection, AcceptError>> + 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<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