Trait libbpf_rs::skel::SkelBuilder

source ·
pub trait SkelBuilder<'a> {
    type Output: OpenSkel;

    // Required methods
    fn open(self) -> Result<Self::Output>;
    fn open_opts(self, open_opts: bpf_object_open_opts) -> 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

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

Required Methods§

source

fn open(self) -> Result<Self::Output>

Open eBPF object and return OpenSkel

source

fn open_opts(self, open_opts: bpf_object_open_opts) -> 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§