pub struct GhostActorChannelFactory<H: GhostControlHandler> { /* private fields */ }Expand description
Allows attaching new GhostEvent channels to a GhostActor task.
Implementations§
Source§impl<H: GhostControlHandler> GhostActorChannelFactory<H>
impl<H: GhostControlHandler> GhostActorChannelFactory<H>
Sourcepub 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>.
Sourcepub fn create_channel<E>(&self) -> GhostFuture<GhostSender<E>>
pub fn create_channel<E>(&self) -> GhostFuture<GhostSender<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§
Source§impl<H: GhostControlHandler> Clone for GhostActorChannelFactory<H>
impl<H: GhostControlHandler> Clone for GhostActorChannelFactory<H>
Auto Trait Implementations§
impl<H> !RefUnwindSafe for GhostActorChannelFactory<H>
impl<H> !UnwindSafe for GhostActorChannelFactory<H>
impl<H> Forget for GhostActorChannelFactory<H>
impl<H> Freeze for GhostActorChannelFactory<H>where
InjectLock<H>: Freeze,
impl<H> Move for GhostActorChannelFactory<H>
impl<H> Send for GhostActorChannelFactory<H>where
InjectLock<H>: Send,
impl<H> Sync for GhostActorChannelFactory<H>where
InjectLock<H>: Sync,
impl<H> Unpin for GhostActorChannelFactory<H>where
InjectLock<H>: Unpin,
impl<H> UnsafeUnpin for GhostActorChannelFactory<H>where
InjectLock<H>: UnsafeUnpin,
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