Struct Identity

pub struct Identity { /* private fields */ }

A no-op middleware.

When wrapping a Service, the Identity layer returns the provided service without modifying it.

Implementations

impl Identity

const fn new() -> Identity

Create a new Identity value

Trait Implementations

impl Clone for Identity

fn clone(&self) -> Self

impl Debug for Identity

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for Identity

fn default() -> Self

impl<S> Layer<S> for Identity

type Service = S;
fn layer(&self, inner: S) -> Self::Service

Auto Trait Implementations

impl Freeze for Identity

impl RefUnwindSafe for Identity

impl Send for Identity

impl Sync for Identity

impl Unpin for Identity

impl UnsafeUnpin for Identity

impl UnwindSafe for Identity

Blanket Implementations

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

impl<T> Borrow<T> for Identity where T: ?Sized,

impl<T> BorrowMut<T> for Identity where T: ?Sized,

impl<T> CloneToUninit for Identity where T: Clone,

impl<T> From<T> for Identity

impl<T> ToOwned for Identity where T: Clone,

impl<T, U> Into<U> for Identity where U: From<T>,

impl<T, U> TryFrom<U> for Identity where U: Into<T>,

impl<T, U> TryInto<U> for Identity where U: TryFrom<T>,