pub struct ErrnoCode(/* private fields */);Implementations§
Source§impl ErrnoCode
impl ErrnoCode
pub const fn from_return_value(retval: u64) -> Self
pub const fn from_error_code(code: i16) -> Self
pub const fn return_value(&self) -> u64
pub const fn error_code(&self) -> u32
Sourcepub fn is_restartable(&self) -> bool
pub fn is_restartable(&self) -> bool
Returns whether this ErrnoCode indicates that a restartable syscall was interrupted.
Sourcepub fn should_restart(&self, sigaction: Option<sigaction_t>) -> bool
pub fn should_restart(&self, sigaction: Option<sigaction_t>) -> bool
Returns whether a combination of this ErrnoCode and a given sigaction_t mean that an
interrupted syscall should be restarted.
Conditions for restarting syscalls:
- the error code is
ERESTARTSYS,ERESTARTNOINTR,ERESTARTNOHAND, orERESTART_RESTARTBLOCKand ERESTARTNOINTRis always restartedERESTARTSYSis only restarted if theSA_RESTARTflag is set in thesigaction_t- all four error codes are restarted if no signal handler was present in the
sigaction_t
Trait Implementations§
impl Copy for ErrnoCode
impl Eq for ErrnoCode
impl StructuralPartialEq for ErrnoCode
Auto Trait Implementations§
impl Freeze for ErrnoCode
impl RefUnwindSafe for ErrnoCode
impl Send for ErrnoCode
impl Sync for ErrnoCode
impl Unpin for ErrnoCode
impl UnwindSafe for ErrnoCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more