pub struct Queue<T, V: Pod> { /* private fields */ }Expand description
Implementations§
Source§impl<T: BorrowMut<MapData>, V: Pod> Queue<T, V>
impl<T: BorrowMut<MapData>, V: Pod> Queue<T, V>
Sourcepub fn pop(&mut self, flags: u64) -> Result<V, MapError>
pub fn pop(&mut self, flags: u64) -> Result<V, MapError>
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> Freeze for Queue<T, V>where
T: Freeze,
impl<T, V> RefUnwindSafe for Queue<T, V>where
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<T, V> Send for Queue<T, V>
impl<T, V> Sync for Queue<T, V>
impl<T, V> Unpin for Queue<T, V>
impl<T, V> UnsafeUnpin for Queue<T, V>where
T: UnsafeUnpin,
impl<T, V> UnwindSafe for Queue<T, V>where
T: UnwindSafe,
V: UnwindSafe,
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