pub struct PinnedMap(/* private fields */);Expand description
Maps are normally kept pinned in memory since linked eBPF programs store direct pointers to the maps they depend on.
Methods from Deref<Target = Map>§
pub fn lookup<'a>(&'a self, key: &[u8]) -> Option<MapValueRef<'a>>
pub fn load(&self, key: &[u8]) -> Option<Vec<u8>>
pub fn update( &self, key: MapKey, value: &[u8], flags: u64, ) -> Result<(), MapError>
pub fn delete(&self, key: &[u8]) -> Result<(), MapError>
pub fn get_next_key(&self, key: Option<&[u8]>) -> Result<MapKey, MapError>
pub fn vmo(&self) -> &Arc<Vmo>
pub fn can_read(&self) -> Option<bool>
pub fn ringbuf_reserve(&self, size: u32, flags: u64) -> Result<usize, MapError>
pub fn uses_locks(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PinnedMap
impl !RefUnwindSafe for PinnedMap
impl Send for PinnedMap
impl Sync for PinnedMap
impl Unpin for PinnedMap
impl !UnwindSafe for PinnedMap
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,
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