pub struct Btf { /* private fields */ }
Expand description
Bpf Type Format metadata.
BTF is a kind of debug metadata that allows eBPF programs compiled against one kernel version to be loaded into different kernel versions.
Aya automatically loads BTF metadata if you use Bpf::load_file
. You
only need to explicitly use this type if you want to load BTF from a non-standard
location or if you are using Bpf::load
.
Implementations
sourceimpl Btf
impl Btf
sourcepub fn from_sys_fs() -> Result<Btf, BtfError>
pub fn from_sys_fs() -> Result<Btf, BtfError>
Loads BTF metadata from /sys/kernel/btf/vmlinux
.
sourcepub fn parse_file<P: AsRef<Path>>(
path: P,
endianness: Endianness
) -> Result<Btf, BtfError>
pub fn parse_file<P: AsRef<Path>>(
path: P,
endianness: Endianness
) -> Result<Btf, BtfError>
Loads BTF metadata from the given path
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Btf
impl Send for Btf
impl Sync for Btf
impl Unpin for Btf
impl UnwindSafe for Btf
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more