pub struct UdpParseArgs<A: IpAddress, C> { /* private fields */ }Expand description
Arguments required to parse a UDP packet.
Implementations§
Source§impl<A: IpAddress> UdpParseArgs<A, NoOpParsingContext>
impl<A: IpAddress> UdpParseArgs<A, NoOpParsingContext>
Source§impl<A: IpAddress, C> UdpParseArgs<A, C>
impl<A: IpAddress, C> UdpParseArgs<A, C>
Sourcepub fn with_context(src_ip: A, dst_ip: A, context: C) -> Self
pub fn with_context(src_ip: A, dst_ip: A, context: C) -> Self
Construct a new UdpParseArgs with a parsing context.
Trait Implementations§
Source§impl<B: SplitByteSlice, A: IpAddress, C: UdpParseContext> FromRaw<UdpPacketRaw<B>, UdpParseArgs<A, C>> for UdpPacket<B>
impl<B: SplitByteSlice, A: IpAddress, C: UdpParseContext> FromRaw<UdpPacketRaw<B>, UdpParseArgs<A, C>> for UdpPacket<B>
Source§type Error = ParseError
type Error = ParseError
The type of error that may happen during validation.
Source§fn try_from_raw_with(
raw: UdpPacketRaw<B>,
_: UdpParseArgs<A, C>,
) -> Result<Self, Self::Error>
fn try_from_raw_with( raw: UdpPacketRaw<B>, _: UdpParseArgs<A, C>, ) -> Result<Self, Self::Error>
Attempts to create
Self from the raw form in raw with args.Source§impl<B: SplitByteSlice, A: IpAddress, C: UdpParseContext> ParsablePacket<B, UdpParseArgs<A, C>> for UdpPacket<B>
impl<B: SplitByteSlice, A: IpAddress, C: UdpParseContext> ParsablePacket<B, UdpParseArgs<A, C>> for UdpPacket<B>
Source§fn parse_metadata(&self) -> ParseMetadata
fn parse_metadata(&self) -> ParseMetadata
Gets metadata about this packet required by
GrowBuffer::undo_parse. Read moreSource§fn parse<BV: BufferView<B>>(
buffer: BV,
args: UdpParseArgs<A, C>,
) -> ParseResult<Self>
fn parse<BV: BufferView<B>>( buffer: BV, args: UdpParseArgs<A, C>, ) -> ParseResult<Self>
Parses a packet from a buffer. Read more
Source§fn parse_mut<BV>(buffer: BV, args: ParseArgs) -> Result<Self, Self::Error>where
BV: BufferViewMut<B>,
B: SplitByteSliceMut,
fn parse_mut<BV>(buffer: BV, args: ParseArgs) -> Result<Self, Self::Error>where
BV: BufferViewMut<B>,
B: SplitByteSliceMut,
Parses a packet from a mutable buffer. Read more
Auto Trait Implementations§
impl<A, C> Freeze for UdpParseArgs<A, C>
impl<A, C> RefUnwindSafe for UdpParseArgs<A, C>where
A: RefUnwindSafe,
C: RefUnwindSafe,
impl<A, C> Send for UdpParseArgs<A, C>where
C: Send,
impl<A, C> Sync for UdpParseArgs<A, C>where
C: Sync,
impl<A, C> Unpin for UdpParseArgs<A, C>
impl<A, C> UnsafeUnpin for UdpParseArgs<A, C>where
A: UnsafeUnpin,
C: UnsafeUnpin,
impl<A, C> UnwindSafe for UdpParseArgs<A, C>where
A: UnwindSafe,
C: 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
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