Struct starnix_uapi::errors::Errno
source · pub struct Errno {
pub code: ErrnoCode,
/* private fields */
}
Fields§
§code: ErrnoCode
Implementations§
source§impl Errno
impl Errno
pub fn new( code: ErrnoCode, name: &'static str, context: Option<String> ) -> Errno
sourcepub fn fail<A>(code: ErrnoCode) -> Result<A, Errno>
pub fn fail<A>(code: ErrnoCode) -> Result<A, Errno>
Returns a new Result
that is an Err
with an Errno
with the given code
. This error
has no context, and as such, is cheap to built.
pub fn return_value(&self) -> u64
Trait Implementations§
source§impl Error for Errno
impl Error for Errno
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq<ErrnoCode> for Errno
impl PartialEq<ErrnoCode> for Errno
source§impl PartialEq for Errno
impl PartialEq for Errno
impl Eq for Errno
Auto Trait Implementations§
impl Freeze for Errno
impl RefUnwindSafe for Errno
impl Send for Errno
impl Sync for Errno
impl Unpin for Errno
impl UnwindSafe for Errno
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