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

§

type LibbpfType = bpf_map

The underlying libbpf type.