pub struct Packet { /* private fields */ }
Implementations§
Source§impl Packet
impl Packet
pub fn packet_type(&self) -> PacketType
pub fn conn_id(&self) -> u16
pub fn ts_micros(&self) -> u32
pub fn ts_diff_micros(&self) -> u32
pub fn window_size(&self) -> u32
pub fn seq_num(&self) -> u16
pub fn ack_num(&self) -> u16
pub fn selective_ack(&self) -> Option<&SelectiveAck>
pub fn payload(&self) -> &Vec<u8> ⓘ
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the length in bytes of the encoded packet.
pub fn encode(&self) -> Vec<u8> ⓘ
pub fn decode(value: &[u8]) -> Result<Self, PacketError>
Trait Implementations§
Source§impl From<Packet> for PacketBuilder
impl From<Packet> for PacketBuilder
impl Eq for Packet
impl StructuralPartialEq for Packet
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
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