pub struct HelperSet<C: EbpfProgramContext> { /* private fields */ }Expand description
Stores set of helpers for an eBPF program. The helpers are stored packed in a vector for fast access in the interpreter.
Implementations§
Source§impl<C: EbpfProgramContext> HelperSet<C>
impl<C: EbpfProgramContext> HelperSet<C>
pub fn new(iter: impl IntoIterator<Item = (u32, EbpfHelperImpl<C>)>) -> Self
Sourcepub fn get_index_by_id(&self, id: u32) -> Option<u32>
pub fn get_index_by_id(&self, id: u32) -> Option<u32>
Looks up a helper by ID, returns helper index.
Sourcepub fn get_by_index(&self, index: u32) -> Option<&EbpfHelperImpl<C>>
pub fn get_by_index(&self, index: u32) -> Option<&EbpfHelperImpl<C>>
Returns the helper with the specified index.
Trait Implementations§
Source§impl<C: EbpfProgramContext> Clone for HelperSet<C>
impl<C: EbpfProgramContext> Clone for HelperSet<C>
Source§impl<C: EbpfProgramContext> Default for HelperSet<C>
impl<C: EbpfProgramContext> Default for HelperSet<C>
Source§impl<C: EbpfProgramContext> FromIterator<(u32, EbpfHelperImpl<C>)> for HelperSet<C>
impl<C: EbpfProgramContext> FromIterator<(u32, EbpfHelperImpl<C>)> for HelperSet<C>
Auto Trait Implementations§
impl<C> Freeze for HelperSet<C>
impl<C> RefUnwindSafe for HelperSet<C>
impl<C> Send for HelperSet<C>
impl<C> Sync for HelperSet<C>
impl<C> Unpin for HelperSet<C>
impl<C> UnwindSafe for HelperSet<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more