pub enum BtfError {
Show 18 variants
FileError {
path: PathBuf,
error: Error,
},
InvalidHeader,
InvalidTypeInfo,
InvalidRelocationInfo,
InvalidTypeKind {
kind: u32,
},
InvalidRelocationKind {
kind: u32,
},
InvalidStringOffset {
offset: usize,
},
InvalidInfo {
offset: usize,
len: usize,
section_len: usize,
},
InvalidLineInfo {
offset: usize,
len: usize,
section_len: usize,
},
UnknownBtfType {
type_id: u32,
},
UnexpectedBtfType {
type_id: u32,
},
UnknownBtfTypeName {
type_name: String,
},
MaximumTypeDepthReached {
type_id: u32,
},
LoadError {
io_error: Error,
verifier_log: String,
},
SymbolOffsetNotFound {
symbol_name: String,
},
InvalidDatasec,
UnknownSectionSize {
section_name: String,
},
InvalidSymbolName,
}
Expand description
The error type returned when BTF
operations fail.
Variants
FileError
Error parsing file
InvalidHeader
Error parsing BTF header
InvalidTypeInfo
invalid BTF type info segment
InvalidRelocationInfo
invalid BTF relocation info segment
InvalidTypeKind
Fields
kind: u32
type kind
invalid BTF type kind
InvalidRelocationKind
Fields
kind: u32
type kind
invalid BTF relocation kind
InvalidStringOffset
Fields
offset: usize
offset
invalid BTF string offset
InvalidInfo
invalid BTF info
InvalidLineInfo
invalid BTF line infos
UnknownBtfType
Fields
type_id: u32
type id
unknown BTF type id
UnexpectedBtfType
Fields
type_id: u32
type id
unexpected btf type id
UnknownBtfTypeName
Fields
type_name: String
type name
unknown BTF type
MaximumTypeDepthReached
Fields
type_id: u32
type id
maximum depth reached resolving BTF type
LoadError
Fields
verifier_log: String
The error log produced by the kernel verifier.
Loading the btf failed
SymbolOffsetNotFound
Fields
symbol_name: String
name of the symbol
offset not found for symbol
InvalidDatasec
btf type that is not VAR found in DATASEC
UnknownSectionSize
Fields
section_name: String
name of the section
unable to determine the size of section
InvalidSymbolName
unable to get symbol name
Trait Implementations
sourceimpl Error for BtfError
impl Error for BtfError
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>
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
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for BtfError
impl Send for BtfError
impl Sync for BtfError
impl Unpin for BtfError
impl !UnwindSafe for BtfError
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