pub struct Stack<T, V: Pod> { /* private fields */ }Expand description
Implementations§
Source§impl<T: BorrowMut<MapData>, V: Pod> Stack<T, V>
impl<T: BorrowMut<MapData>, V: Pod> Stack<T, V>
Sourcepub fn pop(&mut self, flags: u64) -> Result<V, MapError>
pub fn pop(&mut self, flags: u64) -> Result<V, MapError>
Removes the last element and returns it.
§Errors
Returns MapError::ElementNotFound if the stack is empty, MapError::SyscallError
if bpf_map_lookup_and_delete_elem fails.
Trait Implementations§
Auto Trait Implementations§
impl<T, V> Freeze for Stack<T, V>where
T: Freeze,
impl<T, V> RefUnwindSafe for Stack<T, V>where
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<T, V> Send for Stack<T, V>
impl<T, V> Sync for Stack<T, V>
impl<T, V> Unpin for Stack<T, V>
impl<T, V> UnwindSafe for Stack<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