pub struct PacketSizeVisitor {
pub size: usize,
}Expand description
Visitor that computes the total byte size of a packet and its payload.
Fields§
§size: usizeImplementations§
Trait Implementations§
Source§impl Default for PacketSizeVisitor
impl Default for PacketSizeVisitor
Source§impl PacketVisitor for PacketSizeVisitor
impl PacketVisitor for PacketSizeVisitor
type Output = ()
fn visit_ethernet(&mut self, pkt: &EthernetPacket<'_>)
fn visit_arp(&mut self, pkt: &ArpPacket<'_>)
fn visit_ipv4(&mut self, pkt: &Ipv4Packet<'_>)
fn visit_ipv6(&mut self, pkt: &Ipv6Packet<'_>)
fn visit_tcp(&mut self, pkt: &TcpPacket<'_>)
fn visit_udp(&mut self, pkt: &UdpPacket<'_>)
fn visit_icmp(&mut self, pkt: &IcmpPacket<'_>)
fn visit_icmpv6(&mut self, pkt: &Icmpv6Packet<'_>)
Auto Trait Implementations§
impl Freeze for PacketSizeVisitor
impl RefUnwindSafe for PacketSizeVisitor
impl Send for PacketSizeVisitor
impl Sync for PacketSizeVisitor
impl Unpin for PacketSizeVisitor
impl UnsafeUnpin for PacketSizeVisitor
impl UnwindSafe for PacketSizeVisitor
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