pub struct ConnectionHeader { /* private fields */ }Implementations§
Source§impl ConnectionHeader
impl ConnectionHeader
pub const LENGTH: u8 = 0x04
pub const fn new(channel_id: u8, sequence_counter: u8, status: u8) -> Self
pub const fn channel_id(self) -> u8
pub const fn sequence_counter(self) -> u8
pub const fn status(self) -> u8
pub fn decode(input: &[u8]) -> Result<(Self, &[u8])>
pub fn encode(self, out: &mut Vec<u8>) -> Result<()>
Trait Implementations§
Source§impl Clone for ConnectionHeader
impl Clone for ConnectionHeader
Source§fn clone(&self) -> ConnectionHeader
fn clone(&self) -> ConnectionHeader
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 ConnectionHeader
Source§impl Debug for ConnectionHeader
impl Debug for ConnectionHeader
impl Eq for ConnectionHeader
Source§impl Hash for ConnectionHeader
impl Hash for ConnectionHeader
Source§impl PartialEq for ConnectionHeader
impl PartialEq for ConnectionHeader
Source§fn eq(&self, other: &ConnectionHeader) -> bool
fn eq(&self, other: &ConnectionHeader) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ConnectionHeader
Auto Trait Implementations§
impl Freeze for ConnectionHeader
impl RefUnwindSafe for ConnectionHeader
impl Send for ConnectionHeader
impl Sync for ConnectionHeader
impl Unpin for ConnectionHeader
impl UnsafeUnpin for ConnectionHeader
impl UnwindSafe for ConnectionHeader
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