dope_sys/kernel/errno.rs
1use std::num;
2
3use crate::{Errno, kernel};
4
5/// Access to the calling thread's native error slot.
6pub trait Source: kernel::raw::Source {
7 fn try_get() -> Result<Option<Errno>, kernel::Invalid> {
8 num::NonZero::new(Self::read())
9 .map(Errno::try_from)
10 .transpose()
11 }
12
13 fn clear();
14}