Btf

Struct Btf 

Source
pub struct Btf<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Btf<'a>

Source

pub fn ptr_sz(&self) -> u32

Source

pub fn types(&self) -> &[BtfType<'_>]

Source

pub fn type_by_id(&self, type_id: u32) -> &BtfType<'_>

Source

pub fn type_cnt(&self) -> u32

Source

pub fn has_ext(&self) -> bool

Source

pub fn func_secs(&self) -> &[BtfExtSection<'_, BtfExtFunc>]

Source

pub fn line_secs(&self) -> &[BtfExtSection<'_, BtfExtLine<'_>>]

Source

pub fn core_reloc_secs(&self) -> &[BtfExtSection<'_, BtfExtCoreReloc<'_>>]

Source

pub fn get_size_of(&self, type_id: u32) -> u32

Source

pub fn get_align_of(&self, type_id: u32) -> u32

Source

pub fn skip_mods(&self, type_id: u32) -> u32

Source

pub fn skip_mods_and_typedefs(&self, type_id: u32) -> u32

Source

pub fn load(elf: &File<'a>) -> BtfResult<Btf<'a>>

Source

pub fn type_size(t: &BtfType<'_>) -> usize

Trait Implementations§

Source§

impl<'a> Debug for Btf<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Btf<'a>

§

impl<'a> RefUnwindSafe for Btf<'a>

§

impl<'a> Send for Btf<'a>

§

impl<'a> Sync for Btf<'a>

§

impl<'a> Unpin for Btf<'a>

§

impl<'a> UnwindSafe for Btf<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.