Trait coap_handler_implementations::HandlerBuilder[][src]

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

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

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

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.

Loading content...

Implementors

impl<'a, OldRD, OldH> HandlerBuilder<'a, OldRD> for OldH where
    Self: Handler<RequestData = OldRD> + Sized
[src]

Loading content...