Struct cros_async::sys::linux::fd_executor::RegisteredSource
source · pub struct RegisteredSource<F> {
pub(crate) source: F,
ex: Weak<RawExecutor<EpollReactor>>,
pub(crate) duped_fd: Arc<OwnedFd>,
}
Fields§
§source: F
§ex: Weak<RawExecutor<EpollReactor>>
§duped_fd: Arc<OwnedFd>
A clone of source
’s underlying FD. Allows us to ensure that the FD isn’t closed during
the epoll wait call. There are well defined sematics for closing an FD in an epoll context
so it might be possible to eliminate this dup if someone thinks hard about it.
Implementations§
source§impl<F: AsRawDescriptor> RegisteredSource<F>
impl<F: AsRawDescriptor> RegisteredSource<F>
pub(crate) fn new(raw: &Arc<RawExecutor<EpollReactor>>, f: F) -> Result<Self>
pub fn wait_readable(&self) -> Result<PendingOperation>
pub fn wait_writable(&self) -> Result<PendingOperation>
Auto Trait Implementations§
impl<F> RefUnwindSafe for RegisteredSource<F>where
F: RefUnwindSafe,
impl<F> Send for RegisteredSource<F>where
F: Send,
impl<F> Sync for RegisteredSource<F>where
F: Sync,
impl<F> Unpin for RegisteredSource<F>where
F: Unpin,
impl<F> UnwindSafe for RegisteredSource<F>where
F: UnwindSafe,
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