Trait libbpf_rs::btf::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>