libbpf_rs::btf

Trait ReferencesType

Source
pub unsafe trait ReferencesType<'btf>: Deref<Target = BtfType<'btf>> + Sealed {
    // Provided methods
    fn referenced_type_id(&self) -> TypeId { ... }
    fn referenced_type(&self) -> BtfType<'btf> { ... }
}
Expand description

Some btf types refer to other types by their type id.

§Safety

It’s only safe to implement this for types where the underlying btf_type has a .type set.

See the docs for a reference of which BtfKind can implement this trait.

Provided Methods§

Source

fn referenced_type_id(&self) -> TypeId

The referenced type’s id.

Source

fn referenced_type(&self) -> BtfType<'btf>

The referenced type.

Implementors§

Source§

impl<'btf> ReferencesType<'btf> for Const<'btf>

Source§

impl<'btf> ReferencesType<'btf> for DeclTag<'btf>

Source§

impl<'btf> ReferencesType<'btf> for Func<'btf>

Source§

impl<'btf> ReferencesType<'btf> for FuncProto<'btf>

Source§

impl<'btf> ReferencesType<'btf> for Ptr<'btf>

Source§

impl<'btf> ReferencesType<'btf> for Restrict<'btf>

Source§

impl<'btf> ReferencesType<'btf> for TypeTag<'btf>

Source§

impl<'btf> ReferencesType<'btf> for Typedef<'btf>

Source§

impl<'btf> ReferencesType<'btf> for Var<'btf>

Source§

impl<'btf> ReferencesType<'btf> for Volatile<'btf>