pub struct TcpOptionsBuilder<'a> {
pub mss: Option<u16>,
pub window_scale: Option<u8>,
pub sack_permitted: bool,
pub sack_blocks: Option<&'a [TcpSackBlock]>,
pub timestamp: Option<TimestampOption>,
}Expand description
A type capable of serializing TCP Options.
Fields§
§mss: Option<u16>The MSS Option to serialize, if any.
window_scale: Option<u8>The Window Scale Option to serialize, if any.
sack_permitted: boolWhether or not to serialize a SACK Permitted option.
sack_blocks: Option<&'a [TcpSackBlock]>The SACK Option to serialize, if any.
timestamp: Option<TimestampOption>The Timestamp Option to serialize, if any.
Trait Implementations§
Source§impl<'a> Debug for TcpOptionsBuilder<'a>
impl<'a> Debug for TcpOptionsBuilder<'a>
Source§impl<'a> Default for TcpOptionsBuilder<'a>
impl<'a> Default for TcpOptionsBuilder<'a>
Source§fn default() -> TcpOptionsBuilder<'a>
fn default() -> TcpOptionsBuilder<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> InnerPacketBuilder for TcpOptionsBuilder<'a>
impl<'a> InnerPacketBuilder for TcpOptionsBuilder<'a>
Source§fn serialize(&self, buffer: &mut [u8])
fn serialize(&self, buffer: &mut [u8])
Serializes this packet into an existing buffer. Read more
Source§fn into_serializer(self) -> InnerSerializer<Self, EmptyBuf>where
Self: Sized,
fn into_serializer(self) -> InnerSerializer<Self, EmptyBuf>where
Self: Sized,
Source§fn into_serializer_with<B>(self, buffer: B) -> InnerSerializer<Self, B>where
B: ShrinkBuffer,
Self: Sized,
fn into_serializer_with<B>(self, buffer: B) -> InnerSerializer<Self, B>where
B: ShrinkBuffer,
Self: Sized,
Converts this
InnerPacketBuilder into a Serializer with a buffer
that can be used for serialization. Read moreSource§impl<'a> TcpOptions for &TcpOptionsBuilder<'a>
impl<'a> TcpOptions for &TcpOptionsBuilder<'a>
Source§fn window_scale(&self) -> Option<u8>
fn window_scale(&self) -> Option<u8>
Access the Window Scale option, if present.
Source§fn sack_permitted(&self) -> bool
fn sack_permitted(&self) -> bool
Access the SACK Permitted option, if present.
Source§fn sack_blocks(&self) -> Option<&[TcpSackBlock]>
fn sack_blocks(&self) -> Option<&[TcpSackBlock]>
Access the SACK option, if present.
Source§fn timestamp(&self) -> Option<&TimestampOption>
fn timestamp(&self) -> Option<&TimestampOption>
Access the timestamp option, if present.
Auto Trait Implementations§
impl<'a> Freeze for TcpOptionsBuilder<'a>
impl<'a> RefUnwindSafe for TcpOptionsBuilder<'a>
impl<'a> Send for TcpOptionsBuilder<'a>
impl<'a> Sync for TcpOptionsBuilder<'a>
impl<'a> Unpin for TcpOptionsBuilder<'a>
impl<'a> UnwindSafe for TcpOptionsBuilder<'a>
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> 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