Trait libbpf_rs::btf::HasSize

source ·
pub unsafe trait HasSize<'btf>: Deref<Target = BtfType<'btf>> + Sealed {
    // Provided method
    fn size(&self) -> usize { ... }
}
Expand description

Some btf types have a size field, describing their size.

§Safety

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

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

Provided Methods§

source

fn size(&self) -> usize

The size of the described type.

Implementors§

source§

impl<'btf> HasSize<'btf> for Composite<'btf>

source§

impl<'btf> HasSize<'btf> for DataSec<'btf>

source§

impl<'btf> HasSize<'btf> for Enum64<'btf>

source§

impl<'btf> HasSize<'btf> for Enum<'btf>

source§

impl<'btf> HasSize<'btf> for Float<'btf>

source§

impl<'btf> HasSize<'btf> for Int<'btf>

source§

impl<'btf> HasSize<'btf> for Struct<'btf>

source§

impl<'btf> HasSize<'btf> for Union<'btf>