pub struct Map {
pub schema: MapSchema,
/* private fields */
}Expand description
A BPF map. This is a hashtable that can be accessed both by BPF programs and userspace.
Fields§
§schema: MapSchemaImplementations§
Source§impl Map
impl Map
pub fn new(schema: MapSchema, name: &str) -> Result<PinnedMap, MapError>
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 Map
impl !RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl !UnwindSafe for Map
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,
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