Struct packet_formats::ipv4::Ipv4PacketBuilderWithOptions
source · pub struct Ipv4PacketBuilderWithOptions<'a, I> { /* private fields */ }
Expand description
A PacketBuilder for Ipv4 Packets but with options.
Implementations§
source§impl<'a, I> Ipv4PacketBuilderWithOptions<'a, I>
impl<'a, I> Ipv4PacketBuilderWithOptions<'a, I>
sourcepub fn new<T: IntoIterator<IntoIter = I>>(
prefix_builder: Ipv4PacketBuilder,
options: T
) -> Result<Ipv4PacketBuilderWithOptions<'a, I>, Ipv4OptionsTooLongError>
pub fn new<T: IntoIterator<IntoIter = I>>( prefix_builder: Ipv4PacketBuilder, options: T ) -> Result<Ipv4PacketBuilderWithOptions<'a, I>, Ipv4OptionsTooLongError>
Creates a new IPv4 packet builder without options.
Returns Err
if the packet header would exceed the maximum length of
MAX_HDR_LEN
. This happens if the options
, when serialized, would
exceed MAX_OPTIONS_LEN
.
Trait Implementations§
source§impl<'a, I: Clone> Clone for Ipv4PacketBuilderWithOptions<'a, I>
impl<'a, I: Clone> Clone for Ipv4PacketBuilderWithOptions<'a, I>
source§fn clone(&self) -> Ipv4PacketBuilderWithOptions<'a, I>
fn clone(&self) -> Ipv4PacketBuilderWithOptions<'a, I>
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<'a, I: Debug> Debug for Ipv4PacketBuilderWithOptions<'a, I>
impl<'a, I: Debug> Debug for Ipv4PacketBuilderWithOptions<'a, I>
source§impl<'a, Item> IpPacketBuilder<Ipv4> for Ipv4PacketBuilderWithOptions<'a, Iter<'a, Item>>
impl<'a, Item> IpPacketBuilder<Ipv4> for Ipv4PacketBuilderWithOptions<'a, Iter<'a, Item>>
source§impl<'a, I> PacketBuilder for Ipv4PacketBuilderWithOptions<'a, I>
impl<'a, I> PacketBuilder for Ipv4PacketBuilderWithOptions<'a, I>
Auto Trait Implementations§
impl<'a, I> Freeze for Ipv4PacketBuilderWithOptions<'a, I>where
I: Freeze,
impl<'a, I> RefUnwindSafe for Ipv4PacketBuilderWithOptions<'a, I>where
I: RefUnwindSafe,
impl<'a, I> Send for Ipv4PacketBuilderWithOptions<'a, I>where
I: Send,
impl<'a, I> Sync for Ipv4PacketBuilderWithOptions<'a, I>where
I: Sync,
impl<'a, I> Unpin for Ipv4PacketBuilderWithOptions<'a, I>where
I: Unpin,
impl<'a, I> UnwindSafe for Ipv4PacketBuilderWithOptions<'a, I>where
I: UnwindSafe,
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