pub struct SackBlocks(/* private fields */);
Expand description
Blocks of selective ACKs.
Implementations§
Source§impl SackBlocks
impl SackBlocks
Sourcepub const MAX_BLOCKS: usize = 4usize
pub const MAX_BLOCKS: usize = 4usize
The maximum number of selective ack blocks that can be in a TCP segment.
See [RFC 2018 section 3].
[RFC 2018 section 3] https://www.rfc-editor.org/rfc/rfc2018#section-3
Sourcepub fn as_option(&self) -> Option<TcpOption<'_>>
pub fn as_option(&self) -> Option<TcpOption<'_>>
Returns the contained selective ACKs as a TCP option.
Returns None
if this SackBlocks
is empty.
Sourcepub fn iter_skip_invalid(&self) -> impl Iterator<Item = SackBlock> + '_
pub fn iter_skip_invalid(&self) -> impl Iterator<Item = SackBlock> + '_
Returns an iterator over the valid SackBlock
s contained in this
option.
Sourcepub fn try_iter(
&self,
) -> impl Iterator<Item = Result<SackBlock, InvalidSackBlockError>> + '_
pub fn try_iter( &self, ) -> impl Iterator<Item = Result<SackBlock, InvalidSackBlockError>> + '_
Returns an iterator yielding the results of converting the blocks in
this option to valid SackBlock
s.
Sourcepub fn from_option(blocks: &[TcpSackBlock]) -> Self
pub fn from_option(blocks: &[TcpSackBlock]) -> Self
Creates a new SackBlocks
option from a slice of blocks seen in a TCP
segment.
Ignores any blocks past SackBlocks::MAX_BLOCKS
.
Trait Implementations§
Source§impl Clone for SackBlocks
impl Clone for SackBlocks
Source§fn clone(&self) -> SackBlocks
fn clone(&self) -> SackBlocks
Returns a copy 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 SackBlocks
impl Debug for SackBlocks
Source§impl Default for SackBlocks
impl Default for SackBlocks
Source§fn default() -> SackBlocks
fn default() -> SackBlocks
Returns the “default value” for a type. Read more
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 PartialEq for SackBlocks
impl PartialEq for SackBlocks
impl Eq for SackBlocks
impl StructuralPartialEq for SackBlocks
Auto Trait Implementations§
impl Freeze for SackBlocks
impl RefUnwindSafe for SackBlocks
impl Send for SackBlocks
impl Sync for SackBlocks
impl Unpin for SackBlocks
impl UnwindSafe for SackBlocks
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<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
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