axum_server::accept

Trait Accept

source
pub trait Accept<I, S> {
    type Stream;
    type Service;
    type Future: Future<Output = Result<(Self::Stream, Self::Service)>>;

    // Required method
    fn accept(&self, stream: I, service: S) -> Self::Future;
}
Expand description

An asynchronous function to modify io stream and service.

Required Associated Types§

source

type Stream

IO stream produced by accept.

source

type Service

Service produced by accept.

source

type Future: Future<Output = Result<(Self::Stream, Self::Service)>>

Future return value.

Required Methods§

source

fn accept(&self, stream: I, service: S) -> Self::Future

Process io stream and service asynchronously.

Implementors§