pub trait Packet {
// Required method
fn load(&self, offset: i32, width: DataWidth) -> Option<BpfValue>;
}Expand description
Trait that should be implemented by packets passed to eBPF programs.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<P: IntoBytes + Immutable> Packet for &P
Simple Packet implementation for packets that can be accessed directly.
impl<P: IntoBytes + Immutable> Packet for &P
Simple Packet implementation for packets that can be accessed directly.