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 const MAX_BLOCKS_WITH_TIMESTAMP: usize = 3usize
pub const MAX_BLOCKS_WITH_TIMESTAMP: usize = 3usize
The maximum number of selective ack blocks that can be in a TCP segment that includes the timestamp option.
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 SackBlocks 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 SackBlocks.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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
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<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
key and return true if they are equal.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>
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>
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