Struct aya::maps::queue::Queue [−][src]
Expand description
A FIFO queue.
Examples
use aya::maps::Queue; use std::convert::TryFrom; let mut queue = Queue::try_from(bpf.map_mut("ARRAY")?)?; queue.push(42, 0)?; queue.push(43, 0)?; assert_eq!(queue.pop(0)?, 42);
Implementations
Removes the first element and returns it.
Errors
Returns MapError::ElementNotFound
if the queue is empty, MapError::SyscallError
if bpf_map_lookup_and_delete_elem
fails.
Trait Implementations
Auto Trait Implementations
impl<T, V> RefUnwindSafe for Queue<T, V> where
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<T, V> UnwindSafe for Queue<T, V> where
T: UnwindSafe,
V: UnwindSafe,