[][src]Struct humblegen_rt::server::Route

pub struct Route {
    pub method: Method,
    pub regex: Regex,
    pub dispatcher: Box<dyn Fn(Request<Body>, Captures<'_>) -> Pin<Box<dyn Send + Sync + Future<Output = Result<Response<Body>, ErrorResponse>>>> + Send + Sync>,
}

A route associates an HTTP method + URL path regex with a DispatcherClosure. It implements regexset_map::Entry and only makes sense within a Service.

Instantiated by generated code.

Fields

method: Methodregex: Regexdispatcher: Box<dyn Fn(Request<Body>, Captures<'_>) -> Pin<Box<dyn Send + Sync + Future<Output = Result<Response<Body>, ErrorResponse>>>> + Send + Sync>

Trait Implementations

impl Debug for Route[src]

impl<'a> Entry<Request<Body>> for Route[src]

Auto Trait Implementations

impl !RefUnwindSafe for Route

impl Send for Route

impl Sync for Route

impl Unpin for Route

impl !UnwindSafe for Route

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> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]