pub struct ReadinessWatched {
watchers: RefCell<Vec<Weak<ReadinessWatcher>>>,
ready_clock: RefCell<VClock>,
}Expand description
Data about a file description that can be watched for readiness (meant to be stored inside said file description).
Fields§
§watchers: RefCell<Vec<Weak<ReadinessWatcher>>>List of readiness watchers that are interested in us.
ready_clock: RefCell<VClock>Vector clock for the most recent change to our readiness. (Ideally this would be one clock per readiness flag, but we’re not bothering with that.)
Implementations§
Source§impl ReadinessWatched
impl ReadinessWatched
fn insert(&self, watcher: &Rc<ReadinessWatcher>)
fn remove(&self, watcher: &Rc<ReadinessWatcher>)
Sourcepub fn has_watcher_with_blocked_thread(&self) -> bool
pub fn has_watcher_with_blocked_thread(&self) -> bool
Returns whether the watched FD has any readiness watcher with a blocked thread watching it.
Sourcepub fn remove_file_num_interests(&self, fd_id: FdId, fd_num: i32)
pub fn remove_file_num_interests(&self, fd_id: FdId, fd_num: i32)
Remove all interes in the given file descriptor, which must refer to the file description
that contains self.
Trait Implementations§
Source§impl Debug for ReadinessWatched
impl Debug for ReadinessWatched
Source§impl Default for ReadinessWatched
impl Default for ReadinessWatched
Source§fn default() -> ReadinessWatched
fn default() -> ReadinessWatched
Source§impl Drop for ReadinessWatched
impl Drop for ReadinessWatched
Auto Trait Implementations§
impl !DynSend for ReadinessWatched
impl !DynSync for ReadinessWatched
impl !Freeze for ReadinessWatched
impl !RefUnwindSafe for ReadinessWatched
impl !Send for ReadinessWatched
impl !Sync for ReadinessWatched
impl !UnwindSafe for ReadinessWatched
impl Unpin for ReadinessWatched
impl UnsafeUnpin for ReadinessWatched
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes