[][src]Struct tophat::server::router::Router

pub struct Router<W> where
    W: AsyncRead + AsyncWrite + Clone + Send + Sync + Unpin + 'static, 
{ /* fields omitted */ }

A minimal router

Implementations

impl<W> Router<W> where
    W: AsyncRead + AsyncWrite + Clone + Send + Sync + Unpin + 'static, 
[src]

pub fn build() -> RouterBuilder<W>[src]

Build a router

pub async fn route(
    &self,
    req: Request,
    resp_wtr: ResponseWriter<W>
) -> Result<ResponseWritten>
[src]

Call this to route a request

Trait Implementations

impl<W: Clone> Clone for Router<W> where
    W: AsyncRead + AsyncWrite + Clone + Send + Sync + Unpin + 'static, 
[src]

Auto Trait Implementations

impl<W> !RefUnwindSafe for Router<W>[src]

impl<W> Send for Router<W>[src]

impl<W> Sync for Router<W>[src]

impl<W> Unpin for Router<W>[src]

impl<W> !UnwindSafe for Router<W>[src]

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> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.