pub enum Dest {
Host,
Workload,
Peer(ActrId),
}Expand description
Destination identifier
Three-way destination for message routing.
§Semantics
-
Dest::Host: Workload -> host side (inproc reverse channel)- Used by the Workload to call the process embedding it
- Routed through
HostGate(zero serialization) - Example: Workload pushing notifications to the host application
-
Dest::Workload: Target this node’s Workload- From the host side: routed through
HostGate(zero serialization) - From the Workload: routed through
PeerGate(full serialization, short-circuit at transport) - Example: host calling its local Workload, or Workload calling itself
- From the host side: routed through
-
Dest::Peer(ActrId): Remote node (full outproc)- Used for cross-process Actor communication
- Routed through
PeerGate(WebRTC/WebSocket) - Example: ClientWorkload calling RemoteServer
Variants§
Host
This node’s host side - Workload calls the embedding process (inproc reverse channel)
Workload
This node’s Workload - self when sent from the workload (from host: inproc, from Workload: outproc short-circuit)
Peer(ActrId)
Remote node - cross-process communication (WebRTC/WebSocket)
Implementations§
Source§impl Dest
impl Dest
Sourcepub fn is_workload(&self) -> bool
pub fn is_workload(&self) -> bool
Check if this is a Workload destination
Sourcepub fn as_peer_id(&self) -> Option<&ActrId>
pub fn as_peer_id(&self) -> Option<&ActrId>
Get the peer’s ActrId if this is a Peer destination
Trait Implementations§
impl Eq for Dest
impl StructuralPartialEq for Dest
Auto Trait Implementations§
impl Freeze for Dest
impl RefUnwindSafe for Dest
impl Send for Dest
impl Sync for Dest
impl Unpin for Dest
impl UnsafeUnpin for Dest
impl UnwindSafe for Dest
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