Struct libbpf_rs::PerfBuffer

source ·
pub struct PerfBuffer<'b> { /* private fields */ }
Expand description

Represents a special kind of Map. Typically used to transfer data between Programs and userspace.

Implementations§

source§

impl PerfBuffer<'_>

source

pub fn epoll_fd(&self) -> i32

source

pub fn poll(&self, timeout: Duration) -> Result<()>

source

pub fn consume(&self) -> Result<()>

source

pub fn consume_buffer(&self, buf_idx: usize) -> Result<()>

source

pub fn buffer_cnt(&self) -> usize

source

pub fn buffer_fd(&self, buf_idx: usize) -> Result<i32>

Trait Implementations§

source§

impl AsRawLibbpf for PerfBuffer<'_>

source§

fn as_libbpf_object(&self) -> NonNull<Self::LibbpfType>

Retrieve the underlying libbpf_sys::perf_buffer.

§

type LibbpfType = perf_buffer

The underlying libbpf type.
source§

impl<'b> Debug for PerfBuffer<'b>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for PerfBuffer<'_>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for PerfBuffer<'_>

Auto Trait Implementations§

§

impl<'b> Freeze for PerfBuffer<'b>

§

impl<'b> !RefUnwindSafe for PerfBuffer<'b>

§

impl<'b> !Sync for PerfBuffer<'b>

§

impl<'b> Unpin for PerfBuffer<'b>

§

impl<'b> !UnwindSafe for PerfBuffer<'b>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.