[][src]Struct libbpf_rs::OpenObject

pub struct OpenObject { /* fields omitted */ }

Represents an opened (but not yet loaded) BPF object file.

Use this object to access OpenMaps and OpenPrograms.

Implementations

impl OpenObject[src]

pub fn name<'a>(&'a self) -> Result<&'a str>[src]

pub fn map<T: AsRef<str>>(&mut self, name: T) -> Result<Option<&mut OpenMap>>[src]

pub fn map_unwrap<T: AsRef<str>>(&mut self, name: T) -> &mut OpenMap[src]

Same as OpenObject::map except will panic if Err or None is encountered.

pub fn prog<T: AsRef<str>>(
    &mut self,
    name: T
) -> Result<Option<&mut OpenProgram>>
[src]

pub fn prog_unwrap<T: AsRef<str>>(&mut self, name: T) -> &mut OpenProgram[src]

Same as OpenObject::prog except will panic if Err or None is encountered.

pub fn load(&mut self) -> Result<Object>[src]

Load the maps and programs contained in this BPF object into the system.

After load, further calls to OpenMaps and OpenPrograms are not guaranteed to have any effect.

Auto Trait Implementations

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.