pub struct Code(/* private fields */);Expand description
A positive errno established by one native failure or completion field.
Implementations§
Source§impl Code
impl Code
Sourcepub unsafe fn last<S: Source + ?Sized>() -> Self
pub unsafe fn last<S: Source + ?Sized>() -> Self
Retains the positive error number established by one failed native call.
§Safety
A failed native call left this thread’s errno positive and unchanged.
Sourcepub const unsafe fn new(raw: i32) -> Self
pub const unsafe fn new(raw: i32) -> Self
Retains the positive domain established by the native producer.
§Safety
raw is positive, as established by the unchanged native error field.
Sourcepub unsafe fn from_native(raw: intptr_t) -> Option<Self>
pub unsafe fn from_native(raw: intptr_t) -> Option<Self>
Retains the errno one native completion field reports, if any.
§Safety
raw is that completion’s exact field: zero or a positive c_int.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Code
impl Freeze for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnsafeUnpin for Code
impl UnwindSafe for Code
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