Struct aether_lib::acknowledgement::AcknowledgementList
source · [−]pub struct AcknowledgementList { /* private fields */ }
Expand description
A structure to store the Acknowledgements that need to be sent.
- Used by receiving module to add Acknowledgements for the packets that are received
- Used by sending module to get Acknowledgements to be sent with the next packet
Implementations
sourceimpl AcknowledgementList
impl AcknowledgementList
sourcepub fn new(ack_begin: u32) -> AcknowledgementList
pub fn new(ack_begin: u32) -> AcknowledgementList
Creates a new instance of AcknowledgementList
Arguments
ack_begin
- Theack_begin
value from which this Acknowledgement begins
sourcepub fn check(&self, ack: &u32) -> bool
pub fn check(&self, ack: &u32) -> bool
Check if the given sequence number has been added to the list
Arguments
ack
- The sequence number of the packet to check
sourcepub fn insert(&mut self, ack: u32)
pub fn insert(&mut self, ack: u32)
Insert a sequence number into the Acknowledgement list
Arguments
ack
- Sequence number of the packet to be added to the Acknowledgement list
sourcepub fn get(&self) -> Acknowledgement
pub fn get(&self) -> Acknowledgement
Get an Acknowledgement
structure out of this AcknowledgementList
- Used to add the Acknowledgement to the next outgoing packet
sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if the AcknowledgementList
is complete. The list is complete when
there are not missing packets between ack_begin
to ack_begin + ack_end
.
Thus, all packets within that window have been acknowledged
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AcknowledgementList
impl Send for AcknowledgementList
impl Sync for AcknowledgementList
impl Unpin for AcknowledgementList
impl UnwindSafe for AcknowledgementList
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more