pub struct RemoteEnvelope {
pub recipient_path: String,
pub sender_path: Option<String>,
pub sender_uid: u64,
pub recipient_uid: u64,
pub seq_no: u64,
pub serializer_id: u32,
pub manifest: String,
pub system: bool,
pub payload: Vec<u8>,
}Expand description
A RemoteEnvelope is the unit of payload delivery — one user message
(or system control) bound for one recipient. The envelope itself is
always serialized via bincode regardless of which serializer_id is
used for the inner payload.
Fields§
§recipient_path: StringFull path string of the recipient, including address scheme.
sender_path: Option<String>Optional sender path for tell_with_sender / ask routing.
sender_uid: u64UID of the sending ActorSystem (lets the receiver detect a peer
restart and discard stale state).
recipient_uid: u64Recipient’s expected ActorSystem UID; receiver drops envelopes
whose recipient_uid does not match the local UID, which avoids
surprise message delivery to a freshly-restarted system.
0 means “any UID” (best-effort delivery).
seq_no: u64Monotonic sequence number assigned by the sending Endpoint. Used for ack’d delivery and duplicate suppression.
serializer_id: u32Serializer identifier (looked up in the receiving system’s
SerializerRegistry).
manifest: StringType manifest — usually std::any::type_name::<M>().
system: booltrue for RemoteSystemMsg (Stop/Watch/Unwatch/Terminated),
false for user messages.
payload: Vec<u8>Serialized payload bytes.
Implementations§
Source§impl RemoteEnvelope
impl RemoteEnvelope
pub fn user( recipient: impl Into<String>, sender: Option<String>, sender_uid: u64, recipient_uid: u64, seq_no: u64, serializer_id: u32, manifest: impl Into<String>, payload: Vec<u8>, ) -> Self
pub fn system_msg( recipient: impl Into<String>, sender_uid: u64, recipient_uid: u64, seq_no: u64, manifest: impl Into<String>, payload: Vec<u8>, ) -> Self
Trait Implementations§
Source§impl Clone for RemoteEnvelope
impl Clone for RemoteEnvelope
Source§fn clone(&self) -> RemoteEnvelope
fn clone(&self) -> RemoteEnvelope
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RemoteEnvelope
impl Debug for RemoteEnvelope
Source§impl<'de> Deserialize<'de> for RemoteEnvelope
impl<'de> Deserialize<'de> for RemoteEnvelope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for RemoteEnvelope
impl PartialEq for RemoteEnvelope
Source§impl Serialize for RemoteEnvelope
impl Serialize for RemoteEnvelope
impl Eq for RemoteEnvelope
impl StructuralPartialEq for RemoteEnvelope
Auto Trait Implementations§
impl Freeze for RemoteEnvelope
impl RefUnwindSafe for RemoteEnvelope
impl Send for RemoteEnvelope
impl Sync for RemoteEnvelope
impl Unpin for RemoteEnvelope
impl UnsafeUnpin for RemoteEnvelope
impl UnwindSafe for RemoteEnvelope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.