pub trait FromBpfValue<C>: Sized {
// Required method
unsafe fn from_bpf_value(context: &mut C, v: BpfValue) -> Self;
}Expand description
Trait that should be implemented for types that can be converted from BpfValue.
Used to get a Packet when loading a value from the packet.
Required Methods§
Sourceunsafe fn from_bpf_value(context: &mut C, v: BpfValue) -> Self
unsafe fn from_bpf_value(context: &mut C, v: BpfValue) -> Self
§Safety
Should be called only by the eBPF interpreter when executing verified eBPF code.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.