Type Alias libbpf_rs::MapMut

source ·
pub type MapMut<'obj> = MapImpl<'obj, Mut>;
Expand description

A mutable loaded BPF map.

Aliased Type§

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

Implementations§

source§

impl<'obj> MapMut<'obj>

source

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

Create a [MapMut] from a [libbpf_sys::bpf_map].

source

pub fn pin<P: AsRef<Path>>(&mut self, path: P) -> Result<()>

Pin this map to bpffs.

source

pub fn unpin<P: AsRef<Path>>(&mut self, path: P) -> Result<()>

Unpin this map from bpffs.

source

pub fn attach_struct_ops(&mut self) -> Result<Link>

Attach a struct ops map

Trait Implementations§

source§

impl<'obj> Deref for MapMut<'obj>

§

type Target = MapImpl<'obj>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.