pub struct Ping { /* private fields */ }
Implementations§
Source§impl Ping
impl Ping
pub fn new(payload: [u8; 8]) -> Ping
pub fn pong(payload: [u8; 8]) -> Ping
pub fn is_ack(&self) -> bool
pub fn payload(&self) -> &[u8; 8]
pub fn into_payload(self) -> [u8; 8]
Sourcepub fn load(head: Head, bytes: &[u8]) -> Result<Ping, FrameError>
pub fn load(head: Head, bytes: &[u8]) -> Result<Ping, FrameError>
Builds a Ping
frame from a raw frame.
pub fn encode<B: BufMut>(&self, dst: &mut B)
Trait Implementations§
impl Copy for Ping
impl Eq for Ping
impl StructuralPartialEq for Ping
Auto Trait Implementations§
impl Freeze for Ping
impl RefUnwindSafe for Ping
impl Send for Ping
impl Sync for Ping
impl Unpin for Ping
impl UnwindSafe for Ping
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