libbpf_rs

Type Alias Map

Source
pub type Map<'obj> = MapImpl<'obj>;
Expand description

An immutable loaded BPF map.

Aliased Type§

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

Implementations§

Source§

impl<'obj> Map<'obj>

Source

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

Create a Map from a libbpf_sys::bpf_map.

Source

pub fn is_pinned(&self) -> bool

Returns whether map is pinned or not flag

Source

pub fn get_pin_path(&self) -> Option<&OsStr>

Returns the pin_path if the map is pinned, otherwise, None is returned

Trait Implementations§

Source§

impl AsRawLibbpf for Map<'_>

Source§

fn as_libbpf_object(&self) -> NonNull<Self::LibbpfType>

Retrieve the underlying libbpf_sys::bpf_map.

Source§

type LibbpfType = bpf_map

The underlying libbpf type.