Struct Identity

struct Identity { ... }

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

impl Clone for Identity

fn clone(self: &Self) -> Identity

impl Debug for Identity

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

impl Default for Identity

fn default() -> Identity

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

impl<S> Layer for Identity

fn layer(self: &Self, inner: S) -> <Self as >::Service

impl<T> Any for Identity

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Identity

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

impl<T> BorrowMut for Identity

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

impl<T> CloneToUninit for Identity

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Identity

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Identity

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Identity

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for Identity

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

impl<T, U> TryInto for Identity

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