Trait RequestType

Source
pub trait RequestType: Sized {
    type Request: Request;

    // Required method
    fn borrow(&self) -> &Self::Request;
}
Expand description

Request type trait.

This allows types to implement Request by a proxy type.

Required Associated Types§

Source

type Request: Request

Underlying type that implements Request.

Required Methods§

Source

fn borrow(&self) -> &Self::Request

Borrow a reference to the underlying Request type.

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<T: RequestMethod> RequestType for T
where for<'a> &'a <T as RequestMethod>::Method: From<&'a T>,