[][src]Struct riker::actor::ActorRef

pub struct ActorRef<Msg: Message> {
    pub uri: ActorUri,
    pub cell: ActorCell<Msg>,
}

An actor reference exposes methods to interact with its underlying actor.

All actor references are products of system.actor_of or context.actor_of. When an actor is created using actor_of an ActorRef is returned.

Actor references are lightweight and can be cloned without concern for memory use.

In the event that the underlying actor is terminated messages sent to the actor will be routed to dead letters.

If an actor is restarted all existing references continue to function.

Fields

uri: ActorUricell: ActorCell<Msg>

Methods

impl<Msg: Message> ActorRef<Msg>
[src]

pub fn name(&self) -> &str
[src]

Actor name.

Unique among siblings.

pub fn path(&self) -> &String
[src]

Actor path.

e.g. /user/actor_a/actor_b

pub fn is_root(&self) -> bool
[src]

pub fn parent(&self) -> ActorRef<Msg>
[src]

Parent reference.

pub fn user_root(&self) -> ActorRef<Msg>
[src]

pub fn children<'a>(&'a self) -> Box<dyn Iterator<Item = ActorRef<Msg>> + 'a>
[src]

Iterator over children references.

Trait Implementations

impl<Msg: Message> Tell for ActorRef<Msg>
[src]

type Msg = Msg

impl<Msg: Message> SysTell for ActorRef<Msg>
[src]

type Msg = Msg

impl<Msg: Message> PartialEq<ActorRef<Msg>> for ActorRef<Msg>
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<Msg: Clone + Message> Clone for ActorRef<Msg>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<Msg: Message> Debug for ActorRef<Msg>
[src]

impl<Msg: Message> Display for ActorRef<Msg>
[src]

Auto Trait Implementations

impl<Msg> Send for ActorRef<Msg>

impl<Msg> Sync for ActorRef<Msg>

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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