pub struct PacketBuilder { /* private fields */ }
Implementations§
Source§impl PacketBuilder
impl PacketBuilder
pub fn new( packet_type: PacketType, conn_id: u16, ts_micros: u32, window_size: u32, seq_num: u16, ) -> Self
pub fn ts_micros(self, ts_micros: u32) -> Self
pub fn ts_diff_micros(self, ts_diff_micros: u32) -> Self
pub fn window_size(self, window_size: u32) -> Self
pub fn ack_num(self, ack_num: u16) -> Self
pub fn selective_ack(self, selective_ack: Option<SelectiveAck>) -> Self
pub fn payload(self, payload: Vec<u8>) -> Self
pub fn build(self) -> Packet
Trait Implementations§
Source§impl Clone for PacketBuilder
impl Clone for PacketBuilder
Source§fn clone(&self) -> PacketBuilder
fn clone(&self) -> PacketBuilder
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 PacketBuilder
impl Debug for PacketBuilder
Auto Trait Implementations§
impl Freeze for PacketBuilder
impl RefUnwindSafe for PacketBuilder
impl Send for PacketBuilder
impl Sync for PacketBuilder
impl Unpin for PacketBuilder
impl UnwindSafe for PacketBuilder
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