Trait pal_async::fd::PollFdReady
source · pub trait PollFdReady:
Unpin
+ Send
+ Sync
+ AsAny {
// Required methods
fn poll_fd_ready(
&mut self,
cx: &mut Context<'_>,
slot: InterestSlot,
events: PollEvents,
) -> Poll<PollEvents>;
fn clear_fd_ready(&mut self, slot: InterestSlot);
}
Expand description
A trait for polling file descriptor readiness.
Required Methods§
sourcefn poll_fd_ready(
&mut self,
cx: &mut Context<'_>,
slot: InterestSlot,
events: PollEvents,
) -> Poll<PollEvents>
fn poll_fd_ready( &mut self, cx: &mut Context<'_>, slot: InterestSlot, events: PollEvents, ) -> Poll<PollEvents>
Polls a file descriptor for readiness.
sourcefn clear_fd_ready(&mut self, slot: InterestSlot)
fn clear_fd_ready(&mut self, slot: InterestSlot)
Clears cached socket readiness so that the next call to
poll_socket_ready
will poll the OS again.
With the epoll driver, this may not be sufficient for poll_fd_ready
to
complete again–the caller must also ensure that the kernel has seen a
transition to a not-ready state (e.g. by seeing EAGAIN returned from read
).