Struct libbpf_rs::Object [−][src]
pub struct Object { /* fields omitted */ }
Expand description
Represents a loaded BPF object file.
An Object
is logically in charge of all the contained Program
s and Map
s as well as
the associated metadata and runtime state that underpins the userspace portions of BPF program
execution. As a libbpf-rs user, you must keep the Object
alive during the entire lifetime
of your interaction with anything inside the Object
.
Note that this is an explanation of the motivation – Rust’s lifetime system should already be enforcing this invariant.
Implementations
Takes ownership from pointer.
Safety
If ptr
is not already loaded then further operations on the returned object are
undefined.
It is not safe to manipulate ptr
after this operation.
Get a reference to Map
with the name name
, if one exists.
Get a mutable reference to Map
with the name name
, if one exists.
Get an iterator over references to all Map
s.
Note that this will include automatically generated .data, .rodata, .bss, and
.kconfig maps. You may wish to filter this.
Get an iterator over mutable references to all Map
s.
Note that this will include automatically generated .data, .rodata, .bss, and
.kconfig maps. You may wish to filter this.
Get a reference to Program
with the name name
, if one exists.
Get a mutable reference to Program
with the name name
, if one exists.
Get an iterator over references to all Program
s.
Get an iterator over mutable references to all Program
s.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Object
impl UnwindSafe for Object