pub struct DeserialisedMessage<T> {
pub sender: ActorPath,
pub receiver: ActorPath,
pub content: T,
}Expand description
A deserialised variant of NetMessage
Can be obtained via the try_into_deserialised function.
Fields§
§sender: ActorPathThe sender of the message
More concretely, this is the actor path that was supplied as a source by the original sender.
receiver: ActorPathThe receiver of the message
More concretely, this is the actor path that was used as a destination for the message. In particular, of the message was sent to a named path for the current component, instead of the unique path, then this will be the named path.
content: TThe actual deserialised content of the message
Implementations§
Source§impl<T> DeserialisedMessage<T>
impl<T> DeserialisedMessage<T>
Sourcepub fn with(
sender: ActorPath,
receiver: ActorPath,
content: T,
) -> DeserialisedMessage<T>
pub fn with( sender: ActorPath, receiver: ActorPath, content: T, ) -> DeserialisedMessage<T>
Create a new deserialised message
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for DeserialisedMessage<T>where
T: Freeze,
impl<T> RefUnwindSafe for DeserialisedMessage<T>where
T: RefUnwindSafe,
impl<T> Send for DeserialisedMessage<T>where
T: Send,
impl<T> Sync for DeserialisedMessage<T>where
T: Sync,
impl<T> Unpin for DeserialisedMessage<T>where
T: Unpin,
impl<T> UnsafeUnpin for DeserialisedMessage<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DeserialisedMessage<T>where
T: UnwindSafe,
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