Struct bpf_api::prog::ProgramAttr
source · [−]pub struct ProgramAttr {
pub attach_btf_id: Option<u32>,
pub attach_name: Option<String>,
pub expected_attach_type: Option<AttachType>,
pub prog_name: [u8; 16],
pub prog_type: ProgramType,
}
Fields
attach_btf_id: Option<u32>
The BTF id of the function that this program is to be attached to. Mutually-exclusive with
the attach_name
field.
attach_name: Option<String>
The name of the function that this program is to be attached to. Mutually-exclusive with
the attach_btf_id
field.
expected_attach_type: Option<AttachType>
The type of attachment.
prog_name: [u8; 16]
An optional name for the program.
prog_type: ProgramType
The type of program. Only certain program types can be attached to certain names/btf ids,
so this field and the attach_*
fields need to be coordinated properly.
Trait Implementations
sourceimpl Clone for ProgramAttr
impl Clone for ProgramAttr
sourcefn clone(&self) -> ProgramAttr
fn clone(&self) -> ProgramAttr
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for ProgramAttr
impl Send for ProgramAttr
impl Sync for ProgramAttr
impl Unpin for ProgramAttr
impl UnwindSafe for ProgramAttr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more