pub struct IdentityAdapter<T>(/* private fields */);Expand description
An adapter that maps a type to itself — useful when module A re-publishes its own event with no transformation.
Implementations§
Source§impl<T> IdentityAdapter<T>
impl<T> IdentityAdapter<T>
Trait Implementations§
Source§impl<T> Default for IdentityAdapter<T>
impl<T> Default for IdentityAdapter<T>
Source§impl<T: Clone + Send + Sync + 'static> ModuleAdapter<T, T> for IdentityAdapter<T>
impl<T: Clone + Send + Sync + 'static> ModuleAdapter<T, T> for IdentityAdapter<T>
Source§type Error = IntegrationError
type Error = IntegrationError
The error type for failed conversions.
Source§fn to_internal<'life0, 'async_trait>(
&'life0 self,
external: T,
) -> Pin<Box<dyn Future<Output = Result<T, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn to_internal<'life0, 'async_trait>(
&'life0 self,
external: T,
) -> Pin<Box<dyn Future<Output = Result<T, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Convert an external type into this module’s internal representation.
Source§fn to_external<'life0, 'async_trait>(
&'life0 self,
internal: T,
) -> Pin<Box<dyn Future<Output = Result<T, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn to_external<'life0, 'async_trait>(
&'life0 self,
internal: T,
) -> Pin<Box<dyn Future<Output = Result<T, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Convert this module’s internal type into the external format (optional). Read more
fn not_implemented(&self, method: &str) -> Self::Error
Auto Trait Implementations§
impl<T> Freeze for IdentityAdapter<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for IdentityAdapter<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for IdentityAdapter<T>where
PhantomData<T>: Send,
impl<T> Sync for IdentityAdapter<T>where
PhantomData<T>: Sync,
impl<T> Unpin for IdentityAdapter<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for IdentityAdapter<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for IdentityAdapter<T>where
PhantomData<T>: UnwindSafe,
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more