pub struct ProgramAttr {
    pub prog_name: Option<String>,
    pub prog_type: ProgramType,
    pub expected_attach_type: Option<AttachType>,
    pub attach_btf_id: Option<u32>,
}

Fields

prog_name: Option<String>

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.

expected_attach_type: Option<AttachType>

The type of attachment.

attach_btf_id: Option<u32>

If the probe is being attached to a function using the BTF id, specify it here.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.