#[repr(C)]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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)