pub struct CallingContext {
pub maps: Vec<MapSchema>,
pub helpers: HashMap<u32, &'static HelperDefinition>,
pub args: Vec<Type>,
pub packet_type: Option<Type>,
}Fields§
§maps: Vec<MapSchema>List of map schemas of the associated map. The maps can be accessed using LDDW instruction
with src_reg=BPF_PSEUDO_MAP_IDX.
helpers: HashMap<u32, &'static HelperDefinition>The registered external functions.
args: Vec<Type>The args of the program.
packet_type: Option<Type>Packet type. Normally it should be either None or args[0].
Implementations§
Source§impl CallingContext
impl CallingContext
pub fn register_map(&mut self, schema: MapSchema) -> usize
Trait Implementations§
Source§impl Debug for CallingContext
impl Debug for CallingContext
Auto Trait Implementations§
impl Freeze for CallingContext
impl RefUnwindSafe for CallingContext
impl Send for CallingContext
impl Sync for CallingContext
impl Unpin for CallingContext
impl UnsafeUnpin for CallingContext
impl UnwindSafe for CallingContext
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more