Struct ghost_actor::actor_builder::GhostActorChannelFactory [−][src]
pub struct GhostActorChannelFactory<H: GhostControlHandler> { /* fields omitted */ }
Expand description
Allows attaching new GhostEvent channels to a GhostActor task.
Implementations
pub fn attach_receiver<E, R>(&self, receiver: R) -> GhostFuture<()> where
E: GhostEvent + GhostDispatch<H>,
H: GhostControlHandler + GhostHandler<E>,
R: GhostChannelReceiver<E>,
pub fn attach_receiver<E, R>(&self, receiver: R) -> GhostFuture<()> where
E: GhostEvent + GhostDispatch<H>,
H: GhostControlHandler + GhostHandler<E>,
R: GhostChannelReceiver<E>,
Attach an event receiver to this running (or pending build) GhostActor.
You can attach anything that implements
GhostChannelRecevier<E: GhostEvent>
.
pub fn create_channel<E>(&self) -> GhostFuture<GhostSender<E>> where
E: GhostEvent + GhostDispatch<H>,
H: GhostControlHandler + GhostHandler<E>,
pub fn create_channel<E>(&self) -> GhostFuture<GhostSender<E>> where
E: GhostEvent + GhostDispatch<H>,
H: GhostControlHandler + GhostHandler<E>,
Attach a new event sender to a running (or pending build) GhostActor. Note - you should only call this once for each GhostEvent type. If you want multiple senders for a GhostEvent, clone the resulting Sender.
Trait Implementations
Auto Trait Implementations
impl<H> !RefUnwindSafe for GhostActorChannelFactory<H>
impl<H> Send for GhostActorChannelFactory<H>
impl<H> Sync for GhostActorChannelFactory<H>
impl<H> Unpin for GhostActorChannelFactory<H>
impl<H> !UnwindSafe for GhostActorChannelFactory<H>
Blanket Implementations
Mutably borrows from an owned value. Read more
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more