pub struct DynActorRef { /* private fields */ }Expand description
A kind of actor reference that only allows network messages to be sent
For local-only dynamically typed actors, consider using type Message = Box<Any>;
together with ActorRef<Box<Any>> instead.
Implementations§
Source§impl DynActorRef
impl DynActorRef
Sourcepub fn enqueue(&self, msg: NetMessage)
pub fn enqueue(&self, msg: NetMessage)
Enqueue a preconstructed NetMessage directly into the dynamic mailbox.
Sourcepub fn can_upgrade_component(&self) -> bool
pub fn can_upgrade_component(&self) -> bool
Attempts to upgrade the contained component, returning true if possible.
This a somewhat weaker equivalent to an is_alive function, in that
it doesn’t check the lifecycle status of the target component.
Sourcepub fn tell<I>(&self, v: I)where
I: Into<NetMessage>,
pub fn tell<I>(&self, v: I)where
I: Into<NetMessage>,
Send a network message to the target actor
Trait Implementations§
Source§impl Clone for DynActorRef
impl Clone for DynActorRef
Source§fn clone(&self) -> DynActorRef
fn clone(&self) -> DynActorRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DynActorRef
impl Debug for DynActorRef
Source§impl Display for DynActorRef
impl Display for DynActorRef
Source§impl PartialEq for DynActorRef
impl PartialEq for DynActorRef
Source§fn eq(&self, other: &DynActorRef) -> bool
fn eq(&self, other: &DynActorRef) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl RoutingPolicy<DynActorRef, NetMessage> for BroadcastRouting
impl RoutingPolicy<DynActorRef, NetMessage> for BroadcastRouting
Source§fn route(
&self,
members: &[&DynActorRef],
msg: NetMessage,
logger: &Logger<Arc<Fuse<Async>>>,
)
fn route( &self, members: &[&DynActorRef], msg: NetMessage, logger: &Logger<Arc<Fuse<Async>>>, )
Source§fn boxed_clone(
&self,
) -> Box<dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync>
fn boxed_clone( &self, ) -> Box<dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync>
Create a boxed copy of this policy Read more
Source§fn broadcast(
&self,
) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
fn broadcast( &self, ) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
Provide the broadcast part of this policy, if any
Source§fn select(
&self,
) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
fn select( &self, ) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
Provide the select part of this policy, if any
Source§impl<H> RoutingPolicy<DynActorRef, NetMessage> for FieldHashBucketRouting<NetMessage, ActorPath, H>
impl<H> RoutingPolicy<DynActorRef, NetMessage> for FieldHashBucketRouting<NetMessage, ActorPath, H>
Source§fn route(
&self,
members: &[&DynActorRef],
msg: NetMessage,
logger: &Logger<Arc<Fuse<Async>>>,
)
fn route( &self, members: &[&DynActorRef], msg: NetMessage, logger: &Logger<Arc<Fuse<Async>>>, )
Source§fn boxed_clone(
&self,
) -> Box<dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync>
fn boxed_clone( &self, ) -> Box<dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync>
Create a boxed copy of this policy Read more
Source§fn broadcast(
&self,
) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
fn broadcast( &self, ) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
Provide the broadcast part of this policy, if any
Source§fn select(
&self,
) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
fn select( &self, ) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
Provide the select part of this policy, if any
Source§impl RoutingPolicy<DynActorRef, NetMessage> for RoundRobinRouting
impl RoutingPolicy<DynActorRef, NetMessage> for RoundRobinRouting
Source§fn route(
&self,
members: &[&DynActorRef],
msg: NetMessage,
logger: &Logger<Arc<Fuse<Async>>>,
)
fn route( &self, members: &[&DynActorRef], msg: NetMessage, logger: &Logger<Arc<Fuse<Async>>>, )
Source§fn boxed_clone(
&self,
) -> Box<dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync>
fn boxed_clone( &self, ) -> Box<dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync>
Create a boxed copy of this policy Read more
Source§fn broadcast(
&self,
) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
fn broadcast( &self, ) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
Provide the broadcast part of this policy, if any
Source§fn select(
&self,
) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
fn select( &self, ) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
Provide the select part of this policy, if any
Auto Trait Implementations§
impl Freeze for DynActorRef
impl !RefUnwindSafe for DynActorRef
impl Send for DynActorRef
impl Sync for DynActorRef
impl Unpin for DynActorRef
impl UnsafeUnpin for DynActorRef
impl !UnwindSafe for DynActorRef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more