Struct libbpf_rs::RingBuffer
source · pub struct RingBuffer<'cb> { /* private fields */ }
Expand description
Implementations§
source§impl RingBuffer<'_>
impl RingBuffer<'_>
sourcepub fn poll(&self, timeout: Duration) -> Result<()>
pub fn poll(&self, timeout: Duration) -> Result<()>
Poll from all open ring buffers, calling the registered callback for
each one. Polls continually until we either run out of events to consume
or timeout
is reached. If timeout
is Duration::MAX, this will block
indefinitely until an event occurs.
Trait Implementations§
source§impl AsRawLibbpf for RingBuffer<'_>
impl AsRawLibbpf for RingBuffer<'_>
source§fn as_libbpf_object(&self) -> NonNull<Self::LibbpfType>
fn as_libbpf_object(&self) -> NonNull<Self::LibbpfType>
Retrieve the underlying libbpf_sys::ring_buffer
.
§type LibbpfType = ring_buffer
type LibbpfType = ring_buffer
The underlying
libbpf
type.source§impl<'cb> Debug for RingBuffer<'cb>
impl<'cb> Debug for RingBuffer<'cb>
source§impl Drop for RingBuffer<'_>
impl Drop for RingBuffer<'_>
impl Send for RingBuffer<'_>
Auto Trait Implementations§
impl<'cb> !RefUnwindSafe for RingBuffer<'cb>
impl<'cb> !Sync for RingBuffer<'cb>
impl<'cb> Unpin for RingBuffer<'cb>
impl<'cb> !UnwindSafe for RingBuffer<'cb>
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