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() -> IdentityCreate a new
Identityvalue
Trait Implementations
impl Clone for Identity
fn clone(&self) -> Identity
impl Debug for Identity
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for Identity
fn default() -> Identity
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,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Identity
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Identity
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Identity
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Identity
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Identity
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Identity
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Identity
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Identity
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>