[−][src]Struct libbpf_rs::Link
Represents an attached Program
.
This struct is used to model ownership. The underlying program will be detached when this object is dropped if nothing else is holding a reference count.
Implementations
impl Link
[src]
pub unsafe fn from_ptr(ptr: *mut bpf_link) -> Self
[src]
pub fn update_prog(&mut self, prog: Program) -> Result<()>
[src]
Replace the underlying prog with prog
.
pub fn pin<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
[src]
Pin this link to bpffs.
pub fn unpin(&mut self) -> Result<()>
[src]
Unpin from bpffs
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Link
[src]
impl !Send for Link
[src]
impl !Sync for Link
[src]
impl Unpin for Link
[src]
impl UnwindSafe for Link
[src]
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,
pub 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.
pub 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>,