pub struct AsyncMap { /* private fields */ }Available on crate feature
full only.Expand description
A map of pending async syscall results.
Each result is tied to the key that was used to submit the syscall.
Implementations§
Source§impl AsyncMap
impl AsyncMap
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty AsyncMap.
§Examples
use kernel_api::syscall::AsyncMap;
let map = AsyncMap::new();Sourcepub fn push_result(&self, key: usize, result: Result<u128>)
pub fn push_result(&self, key: usize, result: Result<u128>)
Adds a new result with the given key to the map.
§Examples
use kernel_api::syscall::AsyncMap;
let mut map = AsyncMap::new();
map.push_result(5, Ok(0));