Enum fizyr_rpc::MessageType
source · #[repr(u32)]pub enum MessageType {
Request = 0,
Response = 1,
RequesterUpdate = 2,
ResponderUpdate = 3,
Stream = 4,
}
Expand description
The type of a message.
Variants§
Request = 0
A message that initiates a request.
Response = 1
A response message that terminates a request.
RequesterUpdate = 2
An update message sent by the peer that initiated the request.
ResponderUpdate = 3
A response message sent by the peer that received the request.
Stream = 4
A stream message that is sent outside of the context of a request.
Implementations§
source§impl MessageType
impl MessageType
sourcepub fn is_request(self) -> bool
pub fn is_request(self) -> bool
Check if this message type is Self::Request
.
sourcepub fn is_response(self) -> bool
pub fn is_response(self) -> bool
Check if this message type is Self::Response
.
sourcepub fn is_requester_update(self) -> bool
pub fn is_requester_update(self) -> bool
Check if this message type is Self::RequesterUpdate
.
sourcepub fn is_responder_update(self) -> bool
pub fn is_responder_update(self) -> bool
Check if this message type is Self::ResponderUpdate
.
sourcepub fn is_stream(self) -> bool
pub fn is_stream(self) -> bool
Check if this message type is Self::Stream
.
Trait Implementations§
source§impl Clone for MessageType
impl Clone for MessageType
source§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
Returns a copy 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 MessageType
impl Debug for MessageType
source§impl Hash for MessageType
impl Hash for MessageType
source§impl Ord for MessageType
impl Ord for MessageType
source§fn cmp(&self, other: &MessageType) -> Ordering
fn cmp(&self, other: &MessageType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MessageType
impl PartialEq for MessageType
source§fn eq(&self, other: &MessageType) -> bool
fn eq(&self, other: &MessageType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MessageType
impl PartialOrd for MessageType
source§fn partial_cmp(&self, other: &MessageType) -> Option<Ordering>
fn partial_cmp(&self, other: &MessageType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for MessageType
impl Eq for MessageType
impl StructuralEq for MessageType
impl StructuralPartialEq for MessageType
Auto Trait Implementations§
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnwindSafe for MessageType
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