Type Alias libbpf_rs::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.