libbpf_rs::skel

Trait SkelBuilder

Source
pub trait SkelBuilder<'obj> {
    type Output: OpenSkel<'obj>;

    // Required methods
    fn open(
        self,
        object: &'obj mut MaybeUninit<OpenObject>,
    ) -> Result<Self::Output>;
    fn open_opts(
        self,
        open_opts: bpf_object_open_opts,
        object: &'obj mut MaybeUninit<OpenObject>,
    ) -> Result<Self::Output>;
    fn object_builder(&self) -> &ObjectBuilder;
    fn object_builder_mut(&mut self) -> &mut ObjectBuilder;
}
Expand description

A trait for skeleton builder.

Required Associated Types§

Source

type Output: OpenSkel<'obj>

Define that when BPF object is opened, the returned type should implement the OpenSkel trait

Required Methods§

Source

fn open(self, object: &'obj mut MaybeUninit<OpenObject>) -> Result<Self::Output>

Open eBPF object and return OpenSkel

Source

fn open_opts( self, open_opts: bpf_object_open_opts, object: &'obj mut MaybeUninit<OpenObject>, ) -> Result<Self::Output>

Open eBPF object with libbpf_sys::bpf_object_open_opts and return OpenSkel

Source

fn object_builder(&self) -> &ObjectBuilder

Get a reference to ObjectBuilder

Source

fn object_builder_mut(&mut self) -> &mut ObjectBuilder

Get a mutable reference to ObjectBuilder

Implementors§