[][src]Struct hreq_h1::server::Connection

pub struct Connection<S>(_, _, _);

Server connection for accepting incoming requests.

See module level doc for an example.

Implementations

impl<S> Connection<S> where
    S: AsyncRead + AsyncWrite + Unpin
[src]

pub async fn accept<'_>(
    &'_ mut self
) -> Option<Result<(Request<RecvStream>, SendResponse), Error>>
[src]

Accept a new incoming request to handle.

pub async fn close(__arg0: Self)[src]

Wait until the connection has sent/flushed all data and is ok to drop.

Trait Implementations

impl<S> Debug for Connection<S>[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for Connection<S>

impl<S> Send for Connection<S> where
    S: Send

impl<S> Sync for Connection<S> where
    S: Send

impl<S> Unpin for Connection<S>

impl<S> !UnwindSafe for Connection<S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.