pub struct PollFd<'fd> { /* private fields */ }Expand description
struct pollfd—File descriptor and flags for use with poll.
Implementations§
Source§impl<'fd> PollFd<'fd>
impl<'fd> PollFd<'fd>
Sourcepub fn new<Fd: AsFd>(fd: &'fd Fd, events: PollFlags) -> Self
pub fn new<Fd: AsFd>(fd: &'fd Fd, events: PollFlags) -> Self
Constructs a new PollFd holding fd and events.
Sourcepub fn clear_revents(&mut self)
pub fn clear_revents(&mut self)
Clears the ready events.
Sourcepub fn from_borrowed_fd(fd: BorrowedFd<'fd>, events: PollFlags) -> Self
pub fn from_borrowed_fd(fd: BorrowedFd<'fd>, events: PollFlags) -> Self
Constructs a new PollFd holding fd and events.
This is the same as new, but can be used to avoid borrowing the
BorrowedFd, which can be tricky in situations where the BorrowedFd
is a temporary.
Trait Implementations§
Source§impl<'fd> AsFd for PollFd<'fd>
impl<'fd> AsFd for PollFd<'fd>
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Auto Trait Implementations§
impl<'fd> Freeze for PollFd<'fd>
impl<'fd> RefUnwindSafe for PollFd<'fd>
impl<'fd> Send for PollFd<'fd>
impl<'fd> Sync for PollFd<'fd>
impl<'fd> Unpin for PollFd<'fd>
impl<'fd> UnwindSafe for PollFd<'fd>
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