pub struct SackBlock { /* private fields */ }
Expand description
A selective ACK block.
Contains the left and right markers for a received data segment. It is a
witness for a valid non empty open range of SeqNum
.
Implementations§
Source§impl SackBlock
impl SackBlock
Sourcepub fn try_new(
left: SeqNum,
right: SeqNum,
) -> Result<Self, InvalidSackBlockError>
pub fn try_new( left: SeqNum, right: SeqNum, ) -> Result<Self, InvalidSackBlockError>
Attempts to create a new SackBlock
with the range [left, right)
.
Returns an error if right
is at or before left
.
Sourcepub unsafe fn new_unchecked(left: SeqNum, right: SeqNum) -> Self
pub unsafe fn new_unchecked(left: SeqNum, right: SeqNum) -> Self
Sourcepub fn into_range(self) -> Range<SeqNum>
pub fn into_range(self) -> Range<SeqNum>
Sourcepub fn into_range_u32(self) -> Range<u32>
pub fn into_range_u32(self) -> Range<u32>
Sourcepub fn into_parts(self) -> (SeqNum, SeqNum)
pub fn into_parts(self) -> (SeqNum, SeqNum)
Returns a tuple of the left (inclusive) and right (exclusive) edges of the block.
Trait Implementations§
Source§impl From<SackBlock> for TcpSackBlock
impl From<SackBlock> for TcpSackBlock
Source§impl FromIterator<SackBlock> for SackBlocks
Creates a new SackBlocks
option from an iterator of SackBlock
.
impl FromIterator<SackBlock> for SackBlocks
Creates a new SackBlocks
option from an iterator of SackBlock
.
Ignores any blocks past SackBlocks::MAX_BLOCKS
.
Source§impl TryFrom<TcpSackBlock> for SackBlock
impl TryFrom<TcpSackBlock> for SackBlock
impl Copy for SackBlock
impl Eq for SackBlock
impl StructuralPartialEq for SackBlock
Auto Trait Implementations§
impl Freeze for SackBlock
impl RefUnwindSafe for SackBlock
impl Send for SackBlock
impl Sync for SackBlock
impl Unpin for SackBlock
impl UnwindSafe for SackBlock
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,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more