pub struct KcpPacketHeader { /* private fields */ }Implementations§
Source§impl KcpPacketHeader
impl KcpPacketHeader
pub fn conv(&self) -> u32
pub fn src_session_id(&self) -> u32
pub fn dst_session_id(&self) -> u32
pub fn is_syn(&self) -> bool
pub fn is_ack(&self) -> bool
pub fn is_fin(&self) -> bool
pub fn is_data(&self) -> bool
pub fn is_rst(&self) -> bool
pub fn is_ping(&self) -> bool
pub fn is_pong(&self) -> bool
pub fn set_conv(&mut self, conv: u32) -> &mut Self
pub fn set_src_session_id(&mut self, session_id: u32) -> &mut Self
pub fn set_dst_session_id(&mut self, session_id: u32) -> &mut Self
pub fn set_syn(&mut self, syn: bool) -> &mut Self
pub fn set_ack(&mut self, ack: bool) -> &mut Self
pub fn set_fin(&mut self, fin: bool) -> &mut Self
pub fn set_data(&mut self, data: bool) -> &mut Self
pub fn set_rst(&mut self, rst: bool) -> &mut Self
pub fn set_ping(&mut self, ping: bool) -> &mut Self
pub fn set_pong(&mut self, pong: bool) -> &mut Self
Trait Implementations§
Source§impl AsBytes for KcpPacketHeader
impl AsBytes for KcpPacketHeader
Source§impl Clone for KcpPacketHeader
impl Clone for KcpPacketHeader
Source§fn clone(&self) -> KcpPacketHeader
fn clone(&self) -> KcpPacketHeader
Returns a duplicate 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 KcpPacketHeader
impl Debug for KcpPacketHeader
Source§impl Default for KcpPacketHeader
impl Default for KcpPacketHeader
Source§fn default() -> KcpPacketHeader
fn default() -> KcpPacketHeader
Returns the “default value” for a type. Read more
Source§impl FromBytes for KcpPacketHeader
impl FromBytes for KcpPacketHeader
Source§fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>
fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>
Source§fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>
fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>
Source§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
Interprets the prefix of the given
bytes as a &[Self] with length
equal to count without copying. Read moreSource§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
Interprets the suffix of the given
bytes as a &[Self] with length
equal to count without copying. Read moreSource§fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>
fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>
Source§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [Self], &mut [u8])>
fn mut_slice_from_prefix( bytes: &mut [u8], count: usize, ) -> Option<(&mut [Self], &mut [u8])>
Interprets the prefix of the given
bytes as a &mut [Self] with length
equal to count without copying. Read moreSource§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [u8], &mut [Self])>
fn mut_slice_from_suffix( bytes: &mut [u8], count: usize, ) -> Option<(&mut [u8], &mut [Self])>
Interprets the suffix of the given
bytes as a &mut [Self] with length
equal to count without copying. Read moreSource§impl FromZeroes for KcpPacketHeader
impl FromZeroes for KcpPacketHeader
Auto Trait Implementations§
impl Freeze for KcpPacketHeader
impl RefUnwindSafe for KcpPacketHeader
impl Send for KcpPacketHeader
impl Sync for KcpPacketHeader
impl Unpin for KcpPacketHeader
impl UnwindSafe for KcpPacketHeader
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