Message

Enum Message 

pub enum Message {
Show 31 variants Link(Link), Send(Send), Exit(Exit), Unlink(Unlink), NodeLink(NodeLink), RegSend(RegSend), GroupLeader(GroupLeader), Exit2(Exit2), SendTt(SendTt), ExitTt(ExitTt), RegSendTt(RegSendTt), Exit2Tt(Exit2Tt), MonitorP(MonitorP), DemonitorP(DemonitorP), MonitorPExit(MonitorPExit), SendSender(SendSender), SendSenderTt(SendSenderTt), PayloadExit(PayloadExit), PayloadExitTt(PayloadExitTt), PayloadExit2(PayloadExit2), PayloadExit2Tt(PayloadExit2Tt), PayloadMonitorPExit(PayloadMonitorPExit), SpawnRequest(SpawnRequest), SpawnRequestTt(SpawnRequestTt), SpawnReply(SpawnReply), SpawnReplyTt(SpawnReplyTt), UnlinkId(UnlinkId), UnlinkIdAck(UnlinkIdAck), AliasSend(AliasSend), AliasSendTt(AliasSendTt), Tick,
}
Expand description

Message.

Variants§

§

Send(Send)

§

Exit(Exit)

§

RegSend(RegSend)

§

GroupLeader(GroupLeader)

§

Exit2(Exit2)

§

SendTt(SendTt)

§

ExitTt(ExitTt)

§

RegSendTt(RegSendTt)

§

Exit2Tt(Exit2Tt)

§

MonitorP(MonitorP)

§

DemonitorP(DemonitorP)

§

MonitorPExit(MonitorPExit)

§

SendSender(SendSender)

§

SendSenderTt(SendSenderTt)

§

PayloadExit(PayloadExit)

§

PayloadExitTt(PayloadExitTt)

§

PayloadExit2(PayloadExit2)

§

PayloadExit2Tt(PayloadExit2Tt)

§

PayloadMonitorPExit(PayloadMonitorPExit)

§

SpawnRequest(SpawnRequest)

§

SpawnRequestTt(SpawnRequestTt)

§

SpawnReply(SpawnReply)

§

SpawnReplyTt(SpawnReplyTt)

§

UnlinkId(UnlinkId)

§

UnlinkIdAck(UnlinkIdAck)

§

AliasSend(AliasSend)

§

AliasSendTt(AliasSendTt)

§

Tick

Tick message used for keeping alive a connection.

See also: net_ticktime parameter

Implementations§

§

impl Message

Makes a [Link] message.

pub fn send(to_pid: Pid, message: Term) -> Message

Makes a [Send] message.

pub fn exit(from_pid: Pid, to_pid: Pid, reason: Term) -> Message

Makes a [Exit] message.

Makes a [Unlink] message.

Makes a [NodeLink] message.

pub fn reg_send(from_pid: Pid, to_name: Atom, message: Term) -> Message

Makes a [RegSend] message.

pub fn group_leader(from_pid: Pid, to_pid: Pid) -> Message

Makes a [GroupLeader] message.

pub fn exit2(from_pid: Pid, to_pid: Pid, reason: Term) -> Message

Makes a [Exit2] message.

pub fn send_tt(to_pid: Pid, message: Term, trace_token: Term) -> Message

Makes a [SendTt] message.

pub fn exit_tt( from_pid: Pid, to_pid: Pid, reason: Term, trace_token: Term, ) -> Message

Makes a [ExitTt] message.

pub fn reg_send_tt( from_pid: Pid, to_name: Atom, message: Term, trace_token: Term, ) -> Message

Makes a [RegSendTt] message.

pub fn exit2_tt( from_pid: Pid, to_pid: Pid, reason: Term, trace_token: Term, ) -> Message

Makes a [Exit2Tt] message.

pub fn monitor_p( from_pid: Pid, to_proc: PidOrAtom, reference: Reference, ) -> Message

Makes as [MonitorP] message.

pub fn demonitor_p( from_pid: Pid, to_proc: PidOrAtom, reference: Reference, ) -> Message

Makes as [DemonitorP] message.

pub fn monitor_p_exit( from_proc: PidOrAtom, to_pid: Pid, reference: Reference, reason: Term, ) -> Message

Makes as [MonitorPExit] message.

pub fn send_sender(from_pid: Pid, to_pid: Pid, message: Term) -> Message

Makes a [SendSender] message.

pub fn send_sender_tt( from_pid: Pid, to_pid: Pid, message: Term, trace_token: Term, ) -> Message

Makes a [SendSenderTt] message.

pub fn payload_exit(from_pid: Pid, to_pid: Pid, reason: Term) -> Message

Makes a [PayloadExit] message.

pub fn payload_exit_tt( from_pid: Pid, to_pid: Pid, reason: Term, trace_token: Term, ) -> Message

Makes a [PayloadExitTt] message.

pub fn payload_exit2(from_pid: Pid, to_pid: Pid, reason: Term) -> Message

Makes a [PayloadExit2] message.

pub fn payload_exit2_tt( from_pid: Pid, to_pid: Pid, reason: Term, trace_token: Term, ) -> Message

Makes a [PayloadExit2Tt] message.

pub fn payload_monitor_p_exit( from_proc: PidOrAtom, to_pid: Pid, reference: Reference, reason: Term, ) -> Message

Makes a [PayloadMonitorPExit] message.

pub fn spawn_request( req_id: Reference, from_pid: Pid, group_leader: Pid, mfa: Mfa, opt_list: List, arg_list: List, ) -> Message

Makes a [SpawnRequest] message.

pub fn spawn_request_tt( req_id: Reference, from_pid: Pid, group_leader: Pid, mfa: Mfa, opt_list: List, arg_list: List, trace_token: Term, ) -> Message

Makes a [SpawnRequestTt] message.

pub fn spawn_reply( req_id: Reference, to_pid: Pid, flags: FixInteger, result: PidOrAtom, ) -> Message

Makes a [SpawnReply] message.

pub fn spawn_reply_tt( req_id: Reference, to_pid: Pid, flags: FixInteger, result: PidOrAtom, trace_token: Term, ) -> Message

Makes a [SpawnReplyTt] message.

Makes a [UnlinkId] message.

Makes a [UnlinkIdAck] message.

pub fn alias_send(from_pid: Pid, alias: Reference, message: Term) -> Message

Makes a [AliasSend] message.

pub fn alias_send_tt( from_pid: Pid, alias: Reference, message: Term, trace_token: Term, ) -> Message

Makes a [AliasSendTt] message.

pub fn write_into<W>(self, writer: &mut W) -> Result<(), SendError>
where W: Write,

Serialize the Message into a byte buffer

pub fn read_from<R>(reader: &mut R) -> Result<Message, RecvError>
where R: Read,

Deserialize a given byte buffer into a Message. Returns [Err(_)] if the message is malformed

Trait Implementations§

§

impl Clone for Message

§

fn clone(&self) -> Message

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Message

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl PartialEq for Message

§

fn eq(&self, other: &Message) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl StructuralPartialEq for Message

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryAsRef<T> for T

§

fn try_as_ref(&self) -> Option<&T>

§

impl<T> TryAsRef<T> for T

§

fn try_as_ref(&self) -> Option<&T>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more