[−][src]Struct libbpf_rs::Object
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
impl Object
[src]
pub fn map<T: AsRef<str>>(&mut self, name: T) -> Result<Option<&mut Map>>
[src]
pub fn map_unwrap<T: AsRef<str>>(&mut self, name: T) -> &mut Map
[src]
pub fn prog<T: AsRef<str>>(&mut self, name: T) -> Result<Option<&mut Program>>
[src]
pub fn prog_unwrap<T: AsRef<str>>(&mut self, name: T) -> &mut Program
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Object
impl !Send for Object
impl !Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,