pub struct Message {
pub from: u64,
pub payload: Payload,
}Expand description
A message sent between actors.
Fields§
§from: u64§payload: PayloadImplementations§
Source§impl Message
impl Message
pub fn text(s: impl Into<String>) -> Self
pub fn int(i: i64) -> Self
pub fn float(f: f64) -> Self
pub fn bool(b: bool) -> Self
pub fn bytes(b: impl Into<Vec<u8>>) -> Self
pub fn nil() -> Self
pub fn payload(&self) -> &Payload
pub fn as_str(&self) -> Option<&str>
pub fn as_i64(&self) -> Option<i64>
pub fn as_f64(&self) -> Option<f64>
pub fn as_bool(&self) -> Option<bool>
Trait Implementations§
Source§impl IntoMessage for Message
impl IntoMessage for Message
fn into_message(self) -> Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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