#[repr(C)]pub struct EthPacketMut<'a> {
pub buffer: Option<&'a mut IntermediateBuffer>,
}Expand description
This structure represents an Ethernet packet with an optional mutable reference to an IntermediateBuffer.
A Rust equivalent for the _NDISRD_ETH_Packet structure.
The buffer field is an optional mutable reference to an IntermediateBuffer. This design allows for flexibility
when manipulating Ethernet packets, as a packet may not always have a buffer associated with it.
This structure is particularly useful when the packet data needs to be modified.
Fields§
§buffer: Option<&'a mut IntermediateBuffer>An optional mutable reference to an IntermediateBuffer representing the buffer for this Ethernet packet.
Trait Implementations§
Source§impl<'a> AsMut<Option<&'a mut IntermediateBuffer>> for EthPacketMut<'a>
Implements the AsMut trait for EthPacketMut.
impl<'a> AsMut<Option<&'a mut IntermediateBuffer>> for EthPacketMut<'a>
Implements the AsMut trait for EthPacketMut.
This implementation facilitates the conversion of an EthPacketMut into a mutable reference to an Option<&'a mut IntermediateBuffer>.
This conversion is useful when there is a need to directly manipulate the buffer of a packet. By implementing AsMut for EthPacketMut,
we provide a convenient and idiomatic way to perform this transformation.
Source§fn as_mut(&mut self) -> &mut Option<&'a mut IntermediateBuffer>
fn as_mut(&mut self) -> &mut Option<&'a mut IntermediateBuffer>
Source§impl<'a> AsRef<Option<&'a mut IntermediateBuffer>> for EthPacketMut<'a>
Implements the AsRef trait for EthPacketMut.
impl<'a> AsRef<Option<&'a mut IntermediateBuffer>> for EthPacketMut<'a>
Implements the AsRef trait for EthPacketMut.
This implementation facilitates the conversion of an EthPacketMut into a reference to an Option<&'a mut IntermediateBuffer>.
This conversion is useful when there is a need to directly access the buffer of a packet. By implementing AsRef for EthPacketMut,
we provide a convenient and idiomatic way to perform this transformation.
Source§fn as_ref(&self) -> &Option<&'a mut IntermediateBuffer>
fn as_ref(&self) -> &Option<&'a mut IntermediateBuffer>
Source§impl<'a> Default for EthPacketMut<'a>
Implements the Default trait for EthPacketMut.
impl<'a> Default for EthPacketMut<'a>
Implements the Default trait for EthPacketMut.
This implementation allows for the creation of an “empty” EthPacketMut, i.e., a packet without a buffer. This is useful when
initializing a variable of type EthPacketMut without immediately associating a buffer with it.
Source§impl<'a> From<EthPacketMut<'a>> for Option<&'a mut IntermediateBuffer>
Implements the Into trait for EthPacketMut.
impl<'a> From<EthPacketMut<'a>> for Option<&'a mut IntermediateBuffer>
Implements the Into trait for EthPacketMut.
This implementation facilitates the conversion of an EthPacketMut into an Option<&'a mut IntermediateBuffer>.
This conversion is useful when there is a need to directly manipulate the buffer of a packet. By implementing Into for EthPacketMut,
we provide a convenient and idiomatic way to perform this transformation.