pub struct Identity;Expand description
Middleware which returns every message unchanged.
Trait Implementations§
impl Copy for Identity
impl Eq for Identity
Source§impl<Message, State> MessageMiddleware<Message, State> for Identity
impl<Message, State> MessageMiddleware<Message, State> for Identity
Source§type Error = Infallible
type Error = Infallible
An error which prevents the message from continuing through the chain.
impl StructuralPartialEq for Identity
Source§impl<Role, Phase, Message, State> TypedMiddleware<Role, Phase, Message, State> for Identity
impl<Role, Phase, Message, State> TypedMiddleware<Role, Phase, Message, State> for Identity
Source§type Error = Infallible
type Error = Infallible
An error which prevents the message from continuing through the chain.
Source§async fn intercept_typed(
&mut self,
_state: &mut State,
message: Message,
) -> Result<Message, Self::Error>
async fn intercept_typed( &mut self, _state: &mut State, message: Message, ) -> Result<Message, Self::Error>
Observes, mutates, or replaces one phase-legal message and may await while
borrowing both the handler and caller-defined state. Read more
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§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more