pub trait HandlerBuilder<'a, OldRD>where
Self: Handler + Sized,
{ // Required method fn at<H>(self, path: &'a [&'a str], handler: H) -> ForkingHandler<'a, H, Self>
where H: Handler + Sized; }
👎Deprecated
Expand description

Trait implemented by default on all handlers that lets the user stack them using a builder-like syntax.

Note that the resulting ForkingRequestData<ForkingRequestData<…>,()> enums that might look wasteful on paper are optimized into the minimum necessary size since https://github.com/rust-lang/rust/pull/45225. They are, however, suboptimal when it comes to how many times the options are read.

Required Methods§

source

fn at<H>(self, path: &'a [&'a str], handler: H) -> ForkingHandler<'a, H, Self>where
H: Handler + Sized,

👎Deprecated

Divert requests arriving at path into the given handler.

The handler will not not see the Uri-Path (and Uri-Host, as this builder doesn’t do virtual hosting yet) options any more; see the top-level module documentation on Options Hiding for rationale.

Implementors§

source§

impl<'a, OldRD, OldH> HandlerBuilder<'a, OldRD> for OldHwhere
Self: Handler<RequestData = OldRD> + Sized,