pub enum PerfBufferError {
    InvalidPageCount {
        page_count: usize,
    },
    OpenError {
        io_error: Error,
    },
    MMapError {
        io_error: Error,
    },
    PerfEventEnableError {
        io_error: Error,
    },
    NoBuffers,
    MoreSpaceNeeded {
        size: usize,
    },
    IOError(Error),
}
Expand description

Perf buffer error.

Variants

InvalidPageCount

Fields

page_count: usize

the page count

the page count value passed to PerfEventArray::open is invalid.

OpenError

Fields

io_error: Error

the source of this error

perf_event_open failed.

MMapError

Fields

io_error: Error

the source of this error

mmap-ping the buffer failed.

PerfEventEnableError

Fields

io_error: Error

the source of this error

The PERF_EVENT_IOC_ENABLE ioctl failed

NoBuffers

read_events() was called with no output buffers.

MoreSpaceNeeded

Fields

size: usize
👎 Deprecated since 0.10.8:

read_events() now calls BytesMut::reserve() internally, so this error is never returned

expected size

👎 Deprecated since 0.10.8:

read_events() now calls BytesMut::reserve() internally, so this error is never returned

read_events() was called with a buffer that is not large enough to contain the next event in the perf buffer.

IOError(Error)

An IO error occurred.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.