pub enum Acknowledgement {
Lite(SeqNumber),
Small(SeqNumber, AckStatistics),
Full(SeqNumber, AckStatistics, FullAckSeqNumber),
}
Expand description
Data included in a ACK packet. spec
There are three types of ACK packets:
- Full - includes all the fields
- Lite - no optional fields
- Small - Includes rtt, rtt_variance, and buffer_available
However, these aren’t necessarily clean categories–there may be some amount of overlap so full acks are allowed to have no extra info and short acks are allowed to have all the info
SeqNumber is the packet sequence number that all packets have been received until (excluding)
Variants§
Implementations§
Source§impl Acknowledgement
impl Acknowledgement
pub fn ack_number(&self) -> SeqNumber
pub fn full_ack_seq_number(&self) -> Option<FullAckSeqNumber>
pub fn rtt(&self) -> Option<Rtt>
pub fn statistics(&self) -> Option<&AckStatistics>
pub fn serialize(&self, into: &mut impl BufMut)
Trait Implementations§
Source§impl Clone for Acknowledgement
impl Clone for Acknowledgement
Source§fn clone(&self) -> Acknowledgement
fn clone(&self) -> Acknowledgement
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 Acknowledgement
impl Debug for Acknowledgement
Source§impl PartialEq for Acknowledgement
impl PartialEq for Acknowledgement
impl Eq for Acknowledgement
impl StructuralPartialEq for Acknowledgement
Auto Trait Implementations§
impl Freeze for Acknowledgement
impl RefUnwindSafe for Acknowledgement
impl Send for Acknowledgement
impl Sync for Acknowledgement
impl Unpin for Acknowledgement
impl UnwindSafe for Acknowledgement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.