libbpf_rs::btf::types

Struct Void

Source
pub struct Void<'btf> { /* private fields */ }
Expand description

The representation of the c_void type.

Methods from Deref<Target = BtfType<'btf>>§

Source

pub fn type_id(&self) -> TypeId

This type’s type id.

Source

pub fn name(&self) -> Option<&'btf OsStr>

This type’s name.

Source

pub fn kind(&self) -> BtfKind

This type’s kind.

Source

pub fn is_mod(&self) -> bool

Whether this represent’s a modifier.

Source

pub fn is_any_enum(&self) -> bool

Whether this represents any kind of enum.

Source

pub fn is_core_compat(&self, other: &Self) -> bool

Whether this btf type is core compatible to other.

Source

pub fn is_composite(&self) -> bool

Whether this type represents a composite type (struct/union).

Source

pub fn next_type(&self) -> Option<Self>

If this type implements ReferencesType, returns the type it references.

Source

pub fn skip_mods_and_typedefs(&self) -> Self

Given a type, follows the refering type ids until it finds a type that isn’t a modifier or a BtfKind::Typedef.

See is_mod.

Source

pub fn alignment(&self) -> Result<NonZeroUsize>

Returns the alignment of this type, if this type points to some modifier or typedef, those will be skipped until the underlying type (with an alignment) is found.

See skip_mods_and_typedefs.

Trait Implementations§

Source§

impl<'btf> Clone for Void<'btf>

Source§

fn clone(&self) -> Void<'btf>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'btf> Debug for Void<'btf>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'btf> Deref for Void<'btf>

Source§

type Target = BtfType<'btf>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'btf> TryFrom<BtfType<'btf>> for Void<'btf>

Source§

type Error = BtfType<'btf>

The type returned in the event of a conversion error.
Source§

fn try_from(t: BtfType<'btf>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'btf> Copy for Void<'btf>

Auto Trait Implementations§

§

impl<'btf> Freeze for Void<'btf>

§

impl<'btf> RefUnwindSafe for Void<'btf>

§

impl<'btf> !Send for Void<'btf>

§

impl<'btf> !Sync for Void<'btf>

§

impl<'btf> Unpin for Void<'btf>

§

impl<'btf> UnwindSafe for Void<'btf>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.