pub struct MsgEnvelope {
pub message: Message,
pub origin: MsgSender,
pub proxies: Vec<MsgSender>,
}Expand description
Fields§
§message: Message§origin: MsgSenderThe source of the message.
proxies: Vec<MsgSender>Intermediate actors, so far, on the path of this message. Every new actor handling this message, would add itself here.
Implementations§
Source§impl MsgEnvelope
impl MsgEnvelope
Sourcepub fn verify(&self) -> bool
pub fn verify(&self) -> bool
This is not quite good. It does work for the cases we have, but it does so without being clearly robust/flexible. So, needs some improvement..
Sourcepub fn add_proxy(&mut self, proxy: MsgSender)
pub fn add_proxy(&mut self, proxy: MsgSender)
The proxy would first sign the MsgEnvelope, and then call this method to add itself (public key + the signature) to the envelope.
Sourcepub fn most_recent_sender(&self) -> &MsgSender
pub fn most_recent_sender(&self) -> &MsgSender
Sourcepub fn destination(&self) -> Address
pub fn destination(&self) -> Address
Trait Implementations§
Source§impl Clone for MsgEnvelope
impl Clone for MsgEnvelope
Source§fn clone(&self) -> MsgEnvelope
fn clone(&self) -> MsgEnvelope
Returns a duplicate of the value. Read more
1.0.0 · 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 MsgEnvelope
impl Debug for MsgEnvelope
Source§impl<'de> Deserialize<'de> for MsgEnvelope
impl<'de> Deserialize<'de> for MsgEnvelope
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for MsgEnvelope
impl Hash for MsgEnvelope
Source§impl PartialEq for MsgEnvelope
impl PartialEq for MsgEnvelope
Source§impl Serialize for MsgEnvelope
impl Serialize for MsgEnvelope
impl Eq for MsgEnvelope
impl StructuralPartialEq for MsgEnvelope
Auto Trait Implementations§
impl Freeze for MsgEnvelope
impl RefUnwindSafe for MsgEnvelope
impl Send for MsgEnvelope
impl Sync for MsgEnvelope
impl Unpin for MsgEnvelope
impl UnwindSafe for MsgEnvelope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more