Enum onc_rpc::MessageType
source · pub enum MessageType<T, P>{
Call(CallBody<T, P>),
Reply(ReplyBody<T, P>),
}
Expand description
The type of RPC message.
Variants§
Call(CallBody<T, P>)
This message is invoking an RPC.
Reply(ReplyBody<T, P>)
This message is a response to an RPC request.
Implementations§
source§impl<T, P> MessageType<T, P>
impl<T, P> MessageType<T, P>
sourcepub fn serialise_into<W: Write>(&self, buf: W) -> Result<(), Error>
pub fn serialise_into<W: Write>(&self, buf: W) -> Result<(), Error>
Serialises this MessageType
into buf
, advancing the cursor position
by MessageType::serialised_len()
bytes.
sourcepub fn serialised_len(&self) -> u32
pub fn serialised_len(&self) -> u32
Returns the on-wire length of this message once serialised, including the message header.
Trait Implementations§
source§impl<T, P> Debug for MessageType<T, P>
impl<T, P> Debug for MessageType<T, P>
source§impl<T, P> PartialEq for MessageType<T, P>
impl<T, P> PartialEq for MessageType<T, P>
source§fn eq(&self, other: &MessageType<T, P>) -> bool
fn eq(&self, other: &MessageType<T, P>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T, P> StructuralPartialEq for MessageType<T, P>
Auto Trait Implementations§
impl<T, P> Freeze for MessageType<T, P>
impl<T, P> RefUnwindSafe for MessageType<T, P>where
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, P> Send for MessageType<T, P>
impl<T, P> Sync for MessageType<T, P>
impl<T, P> Unpin for MessageType<T, P>
impl<T, P> UnwindSafe for MessageType<T, P>where
P: UnwindSafe,
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