libbpf_rs

Type Alias OpenMap

Source
pub type OpenMap<'obj> = OpenMapImpl<'obj>;
Expand description

An immutable parsed but not yet loaded BPF map.

Aliased Type§

struct OpenMap<'obj> { /* private fields */ }

Implementations§

Source§

impl<'obj> OpenMap<'obj>

Source

pub fn new(object: &'obj bpf_map) -> Self

Create a new OpenMap from a ptr to a libbpf_sys::bpf_map.

Source

pub fn name(&self) -> &OsStr

Retrieve the OpenMap’s name.

Source

pub fn map_type(&self) -> MapType

Retrieve type of the map.

Source

pub fn initial_value(&self) -> Option<&[u8]>

Retrieve the initial value of the map.