pub struct ActixWrapper<T> { /* private fields */ }
Expand description
Wrapper on top of a generic actor to make it implement actix::Actor trait. The wrapped actor should implement the Handler trait for all the messages it would like to handle. ActixWrapper is then used to create an actix actor that implements the CanSend trait.
Implementations§
Source§impl<T> ActixWrapper<T>
impl<T> ActixWrapper<T>
Trait Implementations§
Source§impl<T> Actor for ActixWrapper<T>
impl<T> Actor for ActixWrapper<T>
Source§type Context = Context<ActixWrapper<T>>
type Context = Context<ActixWrapper<T>>
Actor execution context type
Source§fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Called when an actor gets polled the first time.
Source§fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Called after an actor is in
Actor::Stopping
state. Read moreSource§fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
Start new actor in arbiter’s thread.
Source§impl<T> Deref for ActixWrapper<T>
impl<T> Deref for ActixWrapper<T>
Source§impl<T> DerefMut for ActixWrapper<T>
impl<T> DerefMut for ActixWrapper<T>
Source§impl<M, T> Handler<WithSpanContext<M>> for ActixWrapper<T>where
Self: Actor,
Self::Context: DelayedActionRunner<T>,
T: HandlerWithContext<M>,
M: Message,
<M as Message>::Result: MessageResponse<ActixWrapper<T>, WithSpanContext<M>> + Send,
impl<M, T> Handler<WithSpanContext<M>> for ActixWrapper<T>where
Self: Actor,
Self::Context: DelayedActionRunner<T>,
T: HandlerWithContext<M>,
M: Message,
<M as Message>::Result: MessageResponse<ActixWrapper<T>, WithSpanContext<M>> + Send,
Auto Trait Implementations§
impl<T> Freeze for ActixWrapper<T>where
T: Freeze,
impl<T> RefUnwindSafe for ActixWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for ActixWrapper<T>where
T: Send,
impl<T> Sync for ActixWrapper<T>where
T: Sync,
impl<T> Unpin for ActixWrapper<T>where
T: Unpin,
impl<T> UnwindSafe for ActixWrapper<T>where
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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<A, B> IntoMultiSender<B> for Awhere
B: MultiSenderFrom<A>,
impl<A, B> IntoMultiSender<B> for Awhere
B: MultiSenderFrom<A>,
fn as_multi_sender(self: &Arc<A>) -> B
fn into_multi_sender(self) -> B
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request