libbpf_rs::btf

Trait 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>