#[non_exhaustive]pub enum Sender {
Local(UntypedActorRef),
Remote {
path: ActorPath,
handle: Arc<dyn RemoteRef>,
},
None,
}Expand description
Typed identity of a message’s sender.
Three variants:
Sender::Local— the sender is an actor in thisActorSystem.Sender::Remote— the sender lives in anotherActorSystem, reached via remoting. Carries a path + a remote handle so replies can be serialized back without adowncast.Sender::None— no sender attached (the analog ofIActorRef.NoSender).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
Source§impl From<UntypedActorRef> for Sender
impl From<UntypedActorRef> for Sender
Source§fn from(r: UntypedActorRef) -> Self
fn from(r: UntypedActorRef) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Sender
impl !RefUnwindSafe for Sender
impl Send for Sender
impl Sync for Sender
impl Unpin for Sender
impl UnsafeUnpin for Sender
impl !UnwindSafe for Sender
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