ReportingHandlerBuilder

Trait ReportingHandlerBuilder 

Source
pub trait ReportingHandlerBuilder<'a, OldRD>: HandlerBuilder<'a, OldRD> + Reporting {
    // Provided methods
    fn with_wkc(self) -> WellKnownCore<Self> { ... }
    fn with_extra_record(
        self,
        target: &'a str,
        attributes: &'a [Attribute],
    ) -> WithExtraRecord<'a, 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.

Source

fn with_extra_record( self, target: &'a str, attributes: &'a [Attribute], ) -> WithExtraRecord<'a, Self>

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<OldRD, OldH> ReportingHandlerBuilder<'_, OldRD> for OldH
where OldH: Handler<RequestData = OldRD> + Reporting,