pub struct ReactantRawErasedWrapper<T, C, R> { /* private fields */ }Expand description
Wrapper that implements ReactantRawErased for any concrete ReactantRaw
Implementations§
Source§impl<T, C, R> ReactantRawErasedWrapper<T, C, R>
impl<T, C, R> ReactantRawErasedWrapper<T, C, R>
pub fn new(reactant: Box<R>) -> Self
Sourcepub fn from_typed_reactant(
reactant: Box<R>,
) -> Arc<dyn ReactantRawErased + Send + Sync + 'static>
pub fn from_typed_reactant( reactant: Box<R>, ) -> Arc<dyn ReactantRawErased + Send + Sync + 'static>
Create a type-erased reactant raw from a correctly typed reactant raw
Sourcepub fn get_typed_reactant(&self) -> &R
pub fn get_typed_reactant(&self) -> &R
Get the underlying typed reactant raw
Trait Implementations§
Source§impl<T, C, R> ReactantRawErased for ReactantRawErasedWrapper<T, C, R>
impl<T, C, R> ReactantRawErased for ReactantRawErasedWrapper<T, C, R>
fn react_erased( &self, payload: Arc<dyn PayloadRawErased + Send + Sync + 'static>, ) -> Pin<Box<dyn Future<Output = Result<(), ReactantError>> + Send + 'static>>
fn payload_type_id(&self) -> TypeId
fn codec_type_id(&self) -> TypeId
fn clone_to_box(&self) -> Box<dyn ReactantRawErased + Send + Sync + 'static>
fn clone_to_arc(&self) -> Arc<dyn ReactantRawErased + Send + Sync + 'static>
fn clone_to_any(&self) -> Arc<dyn Any + Send + Sync + 'static>
fn as_any(&self) -> &dyn Any
Auto Trait Implementations§
impl<T, C, R> Freeze for ReactantRawErasedWrapper<T, C, R>
impl<T, C, R> RefUnwindSafe for ReactantRawErasedWrapper<T, C, R>
impl<T, C, R> Send for ReactantRawErasedWrapper<T, C, R>
impl<T, C, R> Sync for ReactantRawErasedWrapper<T, C, R>
impl<T, C, R> Unpin for ReactantRawErasedWrapper<T, C, R>
impl<T, C, R> UnwindSafe for ReactantRawErasedWrapper<T, C, R>
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
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