pub struct Btf {
types: Vec<Ty>,
strings: Vec<u8>,
}Fields§
§types: Vec<Ty>Indexed by type id; id 0 is void.
strings: Vec<u8>Implementations§
Source§impl Btf
impl Btf
pub fn parse(b: &[u8]) -> Result<Btf, String>
fn name(&self, off: u32) -> &[u8] ⓘ
Sourcefn member(&self, t: &Ty, name: &str, depth: usize) -> Option<(u32, u32)>
fn member(&self, t: &Ty, name: &str, depth: usize) -> Option<(u32, u32)>
A member by name, looking into anonymous structs and unions; its
type id and bit offset from the start of t.
fn size_at(&self, id: u32, depth: usize) -> Option<u32>
Auto Trait Implementations§
impl Freeze for Btf
impl RefUnwindSafe for Btf
impl Send for Btf
impl Sync for Btf
impl Unpin for Btf
impl UnsafeUnpin for Btf
impl UnwindSafe for Btf
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more