pub struct ProgramHandle { /* private fields */ }Expand description
Implementations§
Source§impl ProgramHandle
impl ProgramHandle
Sourcepub fn from_prog_id(id: u32) -> Result<Self>
pub fn from_prog_id(id: u32) -> Result<Self>
Open a loaded program by its kernel ID.
Sourcepub fn from_pinned_path<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_pinned_path<P: AsRef<Path>>(path: P) -> Result<Self>
Open a previously pinned program from its bpffs path.
Sourcepub fn prog_type(&self) -> ProgramType
pub fn prog_type(&self) -> ProgramType
The ProgramType of this handle.
Trait Implementations§
Source§impl AsFd for ProgramHandle
impl AsFd for ProgramHandle
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl Debug for ProgramHandle
impl Debug for ProgramHandle
Source§impl TryFrom<&ProgramHandle> for ProgramHandle
impl TryFrom<&ProgramHandle> for ProgramHandle
Source§impl<'obj, T> TryFrom<&ProgramImpl<'obj, T>> for ProgramHandle
impl<'obj, T> TryFrom<&ProgramImpl<'obj, T>> for ProgramHandle
Auto Trait Implementations§
impl Freeze for ProgramHandle
impl RefUnwindSafe for ProgramHandle
impl Send for ProgramHandle
impl Sync for ProgramHandle
impl Unpin for ProgramHandle
impl UnsafeUnpin for ProgramHandle
impl UnwindSafe for ProgramHandle
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