pub struct OpenMap { /* private fields */ }
Expand description
Represents a parsed but not yet loaded BPF map.
This object exposes operations that need to happen before the map is created.
Some methods require working with raw bytes. You may find libraries such as
plain
helpful.
Implementations§
source§impl OpenMap
impl OpenMap
pub fn set_map_ifindex(&mut self, idx: u32)
pub fn set_initial_value(&mut self, data: &[u8]) -> Result<()>
pub fn set_type(&mut self, ty: MapType) -> Result<()>
pub fn set_key_size(&mut self, size: u32) -> Result<()>
pub fn set_value_size(&mut self, size: u32) -> Result<()>
pub fn set_max_entries(&mut self, count: u32) -> Result<()>
pub fn set_map_flags(&mut self, flags: u32) -> Result<()>
pub fn set_numa_node(&mut self, numa_node: u32) -> Result<()>
pub fn set_inner_map_fd(&mut self, inner: &Map)
pub fn set_map_extra(&mut self, map_extra: u64) -> Result<()>
pub fn set_autocreate(&mut self, autocreate: bool) -> Result<()>
pub fn set_pin_path<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Trait Implementations§
source§impl AsRawLibbpf for OpenMap
impl AsRawLibbpf for OpenMap
source§fn as_libbpf_object(&self) -> NonNull<Self::LibbpfType>
fn as_libbpf_object(&self) -> NonNull<Self::LibbpfType>
Retrieve the underlying libbpf_sys::bpf_map
.
§type LibbpfType = bpf_map
type LibbpfType = bpf_map
The underlying
libbpf
type.Auto Trait Implementations§
impl RefUnwindSafe for OpenMap
impl !Send for OpenMap
impl !Sync for OpenMap
impl Unpin for OpenMap
impl UnwindSafe for OpenMap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more