coap_handler_implementations

Trait ReportingHandlerBuilder

Source
pub trait ReportingHandlerBuilder<'a, OldRD>: HandlerBuilder<'a, OldRD> + Reporting {
    // Provided method
    fn with_wkc(self) -> WellKnownCore<Self> { ... }
}
Expand description

Extension trait for handlers that also implement Reporting.

Like HandlerBuilder this is implemented for wherever it works.

(Note that while this could be implemented as a provided method of Reporting, it is split out to stay architecturally analogous to the HandlerBuilder, and to not force this crate’s implementation of .well-known/core onto other users of Reporting. Possibly, these could be separated approaching stabilization.)

Provided Methods§

Source

fn with_wkc(self) -> WellKnownCore<Self>

Add a /.well-known/core resource that exposes the information the previous (stack of) handler(s) exposes throught the Reporting trait.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, OldRD, OldH> ReportingHandlerBuilder<'a, OldRD> for OldH
where OldH: Handler<RequestData = OldRD> + Reporting,