[−][src]Struct sealrs::actors::local_actor_ref::LocalActorRef
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]
&mut self,
factory: &mut dyn AbstractActorSystem,
msg: Message
) -> WrappedFuture<Message, AskTimeoutError>
Call ask_timeout with default timeout
fn ask_timeout(
&mut self,
factory: &mut dyn AbstractActorSystem,
timeout: Duration,
msg: Message
) -> WrappedFuture<Message, AskTimeoutError>
[src]
&mut self,
factory: &mut dyn AbstractActorSystem,
timeout: Duration,
msg: Message
) -> WrappedFuture<Message, AskTimeoutError>
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
fn cell(&mut self) -> TSafe<ActorCell>
[src]
fn clone(&self) -> ActorRef
[src]
fn as_any(&self) -> Box<dyn Any>
[src]
impl PartialEq<LocalActorRef> for LocalActorRef
[src]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for LocalActorRef
[src]
impl Display for LocalActorRef
[src]
impl Hash for LocalActorRef
[src]
Auto Trait Implementations
impl Sync for LocalActorRef
impl Unpin for LocalActorRef
impl Send for LocalActorRef
impl UnwindSafe for LocalActorRef
impl RefUnwindSafe for LocalActorRef
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,