pub trait MapReference {
// Required methods
fn schema(&self) -> &MapSchema;
fn as_bpf_value(&self) -> BpfValue;
fn get_data_ptr(&self) -> Option<BpfValue>;
}Expand description
A strong reference to an eBPF map held for the lifetime of an eBPF linked
with the map. Can be converted to BpfValue, which is used by the program
to identify the map when it calls map helpers.
Required Methods§
fn schema(&self) -> &MapSchema
fn as_bpf_value(&self) -> BpfValue
Sourcefn get_data_ptr(&self) -> Option<BpfValue>
fn get_data_ptr(&self) -> Option<BpfValue>
Returns the address of the first element of this map.
This will only ever be called on a map of type BPF_MAP_TYPE_ARRAY with at least one
element.