pub struct MessageType {
pub method: Method,
pub class: MessageClass,
}Expand description
A message’s class and method together, as encoded in the first two header bytes.
Fields§
§method: MethodThe method, such as Binding or Allocate.
class: MessageClassThe class: request, indication, success response, or error response.
Implementations§
Source§impl MessageType
impl MessageType
Sourcepub fn new(method: Method, class: MessageClass) -> Self
pub fn new(method: Method, class: MessageClass) -> Self
NewType returns new message type with provided method and class.
Sourcepub fn read_value(&mut self, value: u16)
pub fn read_value(&mut self, value: u16)
ReadValue decodes uint16 into MessageType.
Trait Implementations§
Source§impl Clone for MessageType
impl Clone for MessageType
Source§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MessageType
Source§impl Debug for MessageType
impl Debug for MessageType
Source§impl Default for MessageType
impl Default for MessageType
Source§fn default() -> MessageType
fn default() -> MessageType
Returns the “default value” for a type. Read more
Source§impl Display for MessageType
impl Display for MessageType
impl Eq for MessageType
Source§impl PartialEq for MessageType
impl PartialEq for MessageType
Source§impl Setter for MessageType
impl Setter for MessageType
impl StructuralPartialEq for MessageType
Auto Trait Implementations§
impl Freeze for MessageType
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnsafeUnpin 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