pub trait Loader {
type Component;
// Required method
fn load(self, ebpf: &mut Ebpf) -> Result<Self::Component, Error>;
// Provided method
fn configure(&self, _ebpf_loader: &mut EbpfLoader<'_>) -> Result<(), Error> { ... }
}Expand description
This trait enforces organizational principles for configuring and loading Ebpf components. This
should be implemented on configuration structs, in a builder pattern, using load(self, ebpf: &mut Ebpf) instead of the common build(self).
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn configure(&self, _ebpf_loader: &mut EbpfLoader<'_>) -> Result<(), Error>
fn configure(&self, _ebpf_loader: &mut EbpfLoader<'_>) -> Result<(), Error>
Optionally set map max entries or otherwise interact with the EbpfLoader.
§Errors
Returns an Error if the configuration fails.