[−][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
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnwindSafe for Map
impl RefUnwindSafe for Map
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,