Skip to main content

ClientInput

Trait ClientInput 

Source
pub(super) trait ClientInput: Send + 'static {
    // Required method
    fn next(&mut self) -> impl Future<Output = Option<ClientEvent>> + Send;

    // Provided methods
    fn answer_close(&mut self) -> impl Future<Output = ()> + Send { ... }
    fn drain(self, output: Output) -> impl Future<Output = ()> + Send
       where Self: Sized { ... }
}
Expand description

The input of a client.

Required Methods§

Source

fn next(&mut self) -> impl Future<Output = Option<ClientEvent>> + Send

The next event, None once the client went away without a clean close.

Provided Methods§

Source

fn answer_close(&mut self) -> impl Future<Output = ()> + Send

Answer the clean close of the client, see web::answer_close.

Source

fn drain(self, output: Output) -> impl Future<Output = ()> + Send
where Self: Sized,

End the connection once output closed it after ClientEvent::TooLarge, see web::drain.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§