pub struct NotReporting<H: Handler>(_);
Expand description

Wrapper around arbitrary Handlers to make them not report in .well-known/core.

This helps integrating handler implementations that do not yet also implement Reporting by providing a blank report.

(With specialization, this could be moved into the default implementation).

Implementations§

source§

impl<H: Handler> NotReporting<H>

source

pub fn new(handler: H) -> Self

Trait Implementations§

source§

impl<H: Handler> Handler for NotReporting<H>

§

type RequestData = <H as Handler>::RequestData

source§

fn extract_request_data(&mut self, m: &impl ReadableMessage) -> H::RequestData

source§

fn estimate_length(&mut self, r: &Self::RequestData) -> usize

source§

fn build_response( &mut self, m: &mut impl MutableWritableMessage, r: Self::RequestData )

source§

impl<H: Handler> Reporting for NotReporting<H>

§

type Record<'a> where Self: 'a = EmptyRecord

§

type Reporter<'a> where Self: 'a = Empty<EmptyRecord>

source§

fn report(&self) -> Self::Reporter<'_>

Auto Trait Implementations§

§

impl<H> RefUnwindSafe for NotReporting<H>where H: RefUnwindSafe,

§

impl<H> Send for NotReporting<H>where H: Send,

§

impl<H> Sync for NotReporting<H>where H: Sync,

§

impl<H> Unpin for NotReporting<H>where H: Unpin,

§

impl<H> UnwindSafe for NotReporting<H>where H: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn at<H>(self, path: &'a [&'a str], handler: H) -> ForkingHandler<'a, H, OldH>

👎Deprecated
Divert requests arriving at path into the given handler. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.