[−][src]Struct riker::actor::BasicActorRef
A lightweight, un-typed reference to interact with its underlying actor instance through concurrent messaging.
BasicActorRef
can be derived from an original ActorRef<Msg>
.
BasicActorRef
allows for un-typed messaging using try_tell
,
that will return a Result
. If the message type was not supported,
the result will contain an Error
.
BasicActorRef
can be used when the original ActorRef
isn't available,
when you need to use collections to store references from different actor
types, or when using actor selections to message parts of the actor hierarchy.
In general, it is better to use ActorRef
where possible.
Fields
cell: ActorCell
Methods
impl BasicActorRef
[src]
pub fn typed<Msg: Message>(&self, cell: ExtendedCell<Msg>) -> ActorRef<Msg>
[src]
pub fn try_tell<Msg>(
&self,
msg: Msg,
sender: impl Into<Option<BasicActorRef>>
) -> Result<(), ()> where
Msg: Message + Send,
[src]
&self,
msg: Msg,
sender: impl Into<Option<BasicActorRef>>
) -> Result<(), ()> where
Msg: Message + Send,
Send a message to this actor
Returns a result. If the message type is not supported Error is returned.
pub fn try_tell_any(
&self,
msg: &mut AnyMessage,
sender: impl Into<Option<BasicActorRef>>
) -> Result<(), ()>
[src]
&self,
msg: &mut AnyMessage,
sender: impl Into<Option<BasicActorRef>>
) -> Result<(), ()>
Trait Implementations
impl ActorReference for BasicActorRef
[src]
fn name(&self) -> &str
[src]
Actor name.
Unique among siblings.
fn uri(&self) -> &ActorUri
[src]
fn path(&self) -> &ActorPath
[src]
Actor path.
e.g. /user/actor_a/actor_b
fn is_root(&self) -> bool
[src]
fn parent(&self) -> BasicActorRef
[src]
Parent reference.
fn user_root(&self) -> BasicActorRef
[src]
fn has_children(&self) -> bool
[src]
fn is_child(&self, actor: &BasicActorRef) -> bool
[src]
fn children<'a>(&'a self) -> Box<dyn Iterator<Item = BasicActorRef> + 'a>
[src]
Iterator over children references.
fn sys_tell(&self, msg: SystemMsg)
[src]
impl<'_> ActorReference for &'_ BasicActorRef
[src]
fn name(&self) -> &str
[src]
Actor name.
Unique among siblings.
fn uri(&self) -> &ActorUri
[src]
fn path(&self) -> &ActorPath
[src]
Actor path.
e.g. /user/actor_a/actor_b
fn is_root(&self) -> bool
[src]
fn parent(&self) -> BasicActorRef
[src]
Parent reference.
fn user_root(&self) -> BasicActorRef
[src]
fn has_children(&self) -> bool
[src]
fn is_child(&self, actor: &BasicActorRef) -> bool
[src]
fn children<'a>(&'a self) -> Box<dyn Iterator<Item = BasicActorRef> + 'a>
[src]
Iterator over children references.
fn sys_tell(&self, msg: SystemMsg)
[src]
impl Clone for BasicActorRef
[src]
fn clone(&self) -> BasicActorRef
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BasicActorRef
[src]
impl Display for BasicActorRef
[src]
impl<Msg> From<ActorRef<Msg>> for BasicActorRef where
Msg: Message,
[src]
Msg: Message,
fn from(actor: ActorRef<Msg>) -> BasicActorRef
[src]
impl PartialEq<BasicActorRef> for BasicActorRef
[src]
Auto Trait Implementations
impl !RefUnwindSafe for BasicActorRef
impl Send for BasicActorRef
impl Sync for BasicActorRef
impl Unpin for BasicActorRef
impl !UnwindSafe for BasicActorRef
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Message for T where
T: 'static + Clone + Send + Debug,
[src]
T: 'static + Clone + Send + Debug,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,