[−][src]Struct redbpf::Map
Maps are loaded automatically, so you normally do not have to do anything to initialise them after loading an ELF file.
The Map structure provides a safe wrapper around the native calls, but do
take and return VoidPtr
arguments.
On top of this, maps do not need to be mutable to be mutated, since the underlying code does not require such guarrantees.
This design makes it easier to deal with maps, and keeps them versatile for sharing data between the kernel and userspace, however, it remains a foot cannon. In the future, this might need more work.
Fields
name: String
kind: u32
Methods
impl Map
[src]
pub fn load(name: &str, code: &[u8]) -> Result<Map>
[src]
pub fn set(&self, key: VoidPtr, value: VoidPtr)
[src]
pub fn get(&self, key: VoidPtr, value: VoidPtr)
[src]
pub fn delete(&self, key: VoidPtr)
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,