pub struct RingPage { /* private fields */ }Expand description
Ring buffer page for perf events.
Implementations§
Source§impl RingPage
impl RingPage
Sourcepub fn new_init(start: usize, len: usize) -> Self
pub fn new_init(start: usize, len: usize) -> Self
Initialize a RingPage from start address and length.
Sourcepub fn write_event(&mut self, data: &[u8]) -> LinuxResult<()>
pub fn write_event(&mut self, data: &[u8]) -> LinuxResult<()>
Write a perf event to the ring buffer.
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Get the ring buffer as a mutable slice.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RingPage
impl RefUnwindSafe for RingPage
impl Send for RingPage
impl Sync for RingPage
impl Unpin for RingPage
impl UnsafeUnpin for RingPage
impl UnwindSafe for RingPage
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more