[][src]Struct ghost_actor::example::MyActorSender

pub struct MyActorSender { /* fields omitted */ }

A cheaply clone-able handle to control a ghost_actor task.

Implementations

impl MyActorSender[src]

pub async fn ghost_actor_spawn<C, I, H>(
    factory: GhostActorSpawn<MyActorInternalSender<I>, H, MyError>
) -> MyActorResult<(Self, GhostActorDriver)> where
    C: 'static + Send,
    I: 'static + Send,
    H: MyActorHandler<C, I>, 
[src]

Library users will likely not use this function, look to the implementation of your actor for a simpler spawn. GhostActor implementors will use this to spawn handler tasks.

pub async fn test_message<'_>(
    &'_ mut self,
    input: String
) -> MyActorResult<String>
[src]

A test message, sends a String, receives a String.

pub async fn add_one<'_>(&'_ mut self, input: u32) -> MyActorResult<u32>[src]

A test function, output adds 1 to input.

pub async fn req_not_debug<'_>(
    &'_ mut self,
    input: NotDebug
) -> MyActorResult<()>
[src]

Ensure we can take params that don't implement Deug

pub async fn funky_internal<'_>(
    &'_ mut self,
    input: String
) -> MyActorResult<String>
[src]

Makes an internal_sender request from outside. In reality, you'd never need a command like this.

pub async fn funky_stop<'_>(&'_ mut self) -> MyActorResult<()>[src]

Calls internal ghost_actor_shutdown_immediate() command. In reality, you'd never need a command like this.

pub fn ghost_actor_custom<C>(&mut self) -> MyActorHelper<C> where
    C: 'static + Send
[src]

Send a custom message along to the ghost actor.

pub async fn ghost_actor_shutdown<'_>(&'_ mut self) -> MyActorResult<()>[src]

Shutdown the actor.

Trait Implementations

impl Clone for MyActorSender[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.