pub enum PointerOrigin {
MapReadOnly,
MapWritable,
KernelReadOnly,
KernelWritable,
}Expand description
Indicates the origin and mutability of a memory buffer referenced by
Type::PtrToMemory.
Variants§
MapReadOnly
A pointer to a value in a read-only eBPF map (BPF_F_RDONLY_PROG).
MapWritable
A pointer to a value in a writable eBPF map.
KernelReadOnly
A read-only pointer to kernel memory (e.g., packet payload in
sk_buff).
KernelWritable
A writable pointer to kernel memory.
Implementations§
Source§impl PointerOrigin
impl PointerOrigin
Sourcepub fn is_writable(self) -> bool
pub fn is_writable(self) -> bool
Returns true if the memory referenced by this pointer can be written to.
Sourcepub fn is_map_value(self) -> bool
pub fn is_map_value(self) -> bool
Returns true if the pointer points to an eBPF map value.
Trait Implementations§
Source§impl Clone for PointerOrigin
impl Clone for PointerOrigin
impl Copy for PointerOrigin
Source§impl Debug for PointerOrigin
impl Debug for PointerOrigin
impl Eq for PointerOrigin
Source§impl PartialEq for PointerOrigin
impl PartialEq for PointerOrigin
impl StructuralPartialEq for PointerOrigin
Auto Trait Implementations§
impl Freeze for PointerOrigin
impl RefUnwindSafe for PointerOrigin
impl Send for PointerOrigin
impl Sync for PointerOrigin
impl Unpin for PointerOrigin
impl UnsafeUnpin for PointerOrigin
impl UnwindSafe for PointerOrigin
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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