pub struct SyscallCondition { /* private fields */ }
Expand description
An owned syscall condition.
Implementations§
source§impl SyscallCondition
impl SyscallCondition
sourcepub unsafe fn consume_from_c(ptr: *mut SysCallCondition) -> Self
pub unsafe fn consume_from_c(ptr: *mut SysCallCondition) -> Self
“Steal” from a C pointer. i.e. doesn’t increase ref count, but will decrease the ref count when dropped.
§Safety
ptr
must point to a valid object that will not be accessed by other threads
for the lifetime of this object.
sourcepub fn new_from_wakeup_time(abs_wakeup_time: EmulatedTime) -> Self
pub fn new_from_wakeup_time(abs_wakeup_time: EmulatedTime) -> Self
Create a new syscall condition that triggers a wakeup on the calling thread only after the
abs_wakeup_time
has been reached.
Panics if abs_wakeup_time
is before the current emulated time.
sourcepub fn into_inner(self) -> *mut SysCallCondition
pub fn into_inner(self) -> *mut SysCallCondition
“Steal” the inner pointer without unref’ing it.
Methods from Deref<Target = SyscallConditionRefMut<'static>>§
pub fn set_active_file(&mut self, file: OpenFile)
pub fn wakeup_for_signal(&mut self, host: &Host, signal: Signal) -> bool
pub fn set_timeout(&mut self, timeout: Option<EmulatedTime>)
Methods from Deref<Target = SyscallConditionRef<'a>>§
pub fn active_file(&self) -> Option<&OpenFile>
pub fn timeout(&self) -> Option<EmulatedTime>
Trait Implementations§
source§impl Debug for SyscallCondition
impl Debug for SyscallCondition
source§impl Deref for SyscallCondition
impl Deref for SyscallCondition
source§impl DerefMut for SyscallCondition
impl DerefMut for SyscallCondition
source§impl Drop for SyscallCondition
impl Drop for SyscallCondition
source§impl PartialEq for SyscallCondition
impl PartialEq for SyscallCondition
impl Eq for SyscallCondition
impl StructuralPartialEq for SyscallCondition
Auto Trait Implementations§
impl Freeze for SyscallCondition
impl RefUnwindSafe for SyscallCondition
impl Send for SyscallCondition
impl !Sync for SyscallCondition
impl Unpin for SyscallCondition
impl UnwindSafe for SyscallCondition
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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