pub struct FuncProto<'btf> { /* private fields */ }
Expand description
A function prototype.
See also libbpf docs
Implementations§
source§impl<'btf> FuncProto<'btf>
impl<'btf> FuncProto<'btf>
sourcepub fn get(&self, index: usize) -> Option<FuncProtoParam<'btf>>
pub fn get(&self, index: usize) -> Option<FuncProtoParam<'btf>>
Get a FuncProtoParam
at a given index
§Errors
This function returns None
when the index is out of bounds.
sourcepub fn iter(
&'btf self,
) -> impl ExactSizeIterator<Item = FuncProtoParam<'btf>> + 'btf
pub fn iter( &'btf self, ) -> impl ExactSizeIterator<Item = FuncProtoParam<'btf>> + 'btf
Returns an iterator over the FuncProtoParam
’s of the FuncProto
Methods from Deref<Target = BtfType<'btf>>§
sourcepub fn is_any_enum(&self) -> bool
pub fn is_any_enum(&self) -> bool
Whether this represents any kind of enum.
sourcepub fn is_core_compat(&self, other: &Self) -> bool
pub fn is_core_compat(&self, other: &Self) -> bool
Whether this btf type is core compatible to other
.
sourcepub fn is_composite(&self) -> bool
pub fn is_composite(&self) -> bool
Whether this type represents a composite type (struct/union).
sourcepub fn next_type(&self) -> Option<Self>
pub fn next_type(&self) -> Option<Self>
If this type implements ReferencesType
, returns the type it references.
sourcepub fn skip_mods_and_typedefs(&self) -> Self
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.
sourcepub fn alignment(&self) -> Result<NonZeroUsize>
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.
Trait Implementations§
source§impl<'btf> ReferencesType<'btf> for FuncProto<'btf>
impl<'btf> ReferencesType<'btf> for FuncProto<'btf>
source§fn referenced_type_id(&self) -> TypeId
fn referenced_type_id(&self) -> TypeId
The referenced type’s id.
source§fn referenced_type(&self) -> BtfType<'btf>
fn referenced_type(&self) -> BtfType<'btf>
The referenced type.
Auto Trait Implementations§
impl<'btf> Freeze for FuncProto<'btf>
impl<'btf> RefUnwindSafe for FuncProto<'btf>
impl<'btf> !Send for FuncProto<'btf>
impl<'btf> !Sync for FuncProto<'btf>
impl<'btf> Unpin for FuncProto<'btf>
impl<'btf> UnwindSafe for FuncProto<'btf>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more