[][src]Struct libbpf_rs::Object

pub struct Object { /* fields omitted */ }

Represents a loaded BPF object file.

An Object is logically in charge of all the contained Programs and Maps 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

impl Drop for Object[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.