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

Fields

path: PathBuf

file path

error: Error

source of the error

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

Fields

offset: usize

offset

len: usize

length

section_len: usize

section length

invalid BTF info

InvalidLineInfo

Fields

offset: usize

offset

len: usize

length

section_len: usize

section length

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

io_error: Error

The io::Error returned by the BPF_BTF_LOAD syscall.

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

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.

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.