[][src]Struct sealrs::actors::local_actor_ref::LocalActorRef

pub struct LocalActorRef {
    pub cell: TSafe<ActorCell>,
    pub path: TSafe<ActorPath>,
}

Fields

cell: TSafe<ActorCell>path: TSafe<ActorPath>

Methods

impl LocalActorRef[src]

pub fn new(cell: TSafe<ActorCell>, path: TSafe<ActorPath>) -> LocalActorRef[src]

Creates a new reference. This method should never be invoked by application code. This constructor is used by internal API. Direct use from the user code is prohibited.

Trait Implementations

impl AbstractActorRef for LocalActorRef[src]

fn tell(&mut self, msg: Message, rself: Option<&ActorRef>)[src]

Send message to the actor behind the reference. In the first argument passed message for send, and in the second argument specified sender reference. This reference will be injected to ctx.sender field the actor context object. If sender was does not specified, ctx.sender will be filled with the deadLetter actor reference. Setting up None as sender reference is useful in case, when tell operation is called from outside of the actor system.

Examples

fn ask(
    &mut self,
    factory: &mut dyn AbstractActorSystem,
    msg: Message
) -> WrappedFuture<Message, AskTimeoutError>
[src]

Call ask_timeout with default timeout

fn ask_timeout(
    &mut self,
    factory: &mut dyn AbstractActorSystem,
    timeout: Duration,
    msg: Message
) -> WrappedFuture<Message, AskTimeoutError>
[src]

Sends a message to the target actor and expects that he respond to that message. Expectation represent as future, which will be completed with received message or will be failed with AskTimeoutError, if target actor will not respond with specified timeout.

Example

first.ask(&mut (*ctx.system()), Duration::from_secs(3), msg!(SomeMsg {}))
    .on_complete(|v| {
        // Do something with result (or error)
    });

fn path(&self) -> ActorPath[src]

Return copy of the actor path object

impl Eq for LocalActorRef[src]

impl PartialEq<LocalActorRef> for LocalActorRef[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Hash for LocalActorRef[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for LocalActorRef[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.

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

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

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