pub struct FdWait<T> { /* private fields */ }
Expand description
A PollWait
implementation that waits for an fd to be signaled, then
reads from it.
Implementations§
source§impl<T: PollFdReady> FdWait<T>
impl<T: PollFdReady> FdWait<T>
sourcepub fn new(fd: RawFd, fd_ready: T, read_size: usize) -> Self
pub fn new(fd: RawFd, fd_ready: T, read_size: usize) -> Self
Returns a new instance that waits for fd
to be ready via fd_ready
,
then reads read_size
bytes from it.
Panics if read_size
is greater than MAXIMUM_WAIT_READ_SIZE
.
Trait Implementations§
source§impl<T: 'static + PollFdReady> PollWait for FdWait<T>
impl<T: 'static + PollFdReady> PollWait for FdWait<T>
Auto Trait Implementations§
impl<T> Freeze for FdWait<T>where
T: Freeze,
impl<T> RefUnwindSafe for FdWait<T>where
T: RefUnwindSafe,
impl<T> Send for FdWait<T>where
T: Send,
impl<T> Sync for FdWait<T>where
T: Sync,
impl<T> Unpin for FdWait<T>where
T: Unpin,
impl<T> UnwindSafe for FdWait<T>where
T: 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