pub trait CloseableServerHandler<___T: Transport> {
// Required method
fn close(
&mut self,
sender: &ServerSender<Closeable, ___T>,
responder: Responder<Close>,
) -> impl Future<Output = ()> + Send;
}
Expand description
A server handler for the Closeable protocol.
See Closeable
for more details.
Required Methods§
Sourcefn close(
&mut self,
sender: &ServerSender<Closeable, ___T>,
responder: Responder<Close>,
) -> impl Future<Output = ()> + Send
fn close( &mut self, sender: &ServerSender<Closeable, ___T>, responder: Responder<Close>, ) -> impl Future<Output = ()> + Send
Terminates the connection.
After calling Close
, the client must not send any other requests.
Servers, after sending the status response, should close the connection regardless of status and without sending an epitaph.
Closing the client end of the channel should be semantically equivalent
to calling Close
without knowing when the close has completed or its
status.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.