pub enum BpfError {
FileError {
path: PathBuf,
error: Error,
},
NoPinPath,
UnexpectedPinningType {
name: u32,
},
InvalidPath {
error: String,
},
ParseError(ParseError),
BtfError(BtfError),
RelocationError {
function: String,
error: Box<dyn Error + Send + Sync>,
},
MapError(MapError),
ProgramError(ProgramError),
}
Expand description
The error type returned by Bpf::load_file
and Bpf::load
.
Variants
FileError
Error loading file
NoPinPath
Pinning requested but no path provided
UnexpectedPinningType
Fields
name: u32
The value encountered
Unexpected pinning type
InvalidPath
Fields
error: String
The error message
Invalid path
ParseError(ParseError)
Error parsing BPF object
BtfError(BtfError)
Error parsing BTF object
RelocationError
Error performing relocations
MapError(MapError)
A map error
ProgramError(ProgramError)
A program error
Trait Implementations
sourceimpl Error for BpfError
impl Error for BpfError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<ProgramError> for BpfError
impl From<ProgramError> for BpfError
sourcefn from(source: ProgramError) -> Self
fn from(source: ProgramError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for BpfError
impl Send for BpfError
impl Sync for BpfError
impl Unpin for BpfError
impl !UnwindSafe for BpfError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more