Struct nix::poll::PollFd [−][src]
#[repr(C)]pub struct PollFd { /* fields omitted */ }
This is a wrapper around libc::pollfd.
It's meant to be used as an argument to the poll and
ppoll functions to specify the events of interest
for a specific file descriptor.
After a call to poll or ppoll, the events that occured can be
retrieved by calling revents() on the PollFd.
Methods
impl PollFd[src]
impl PollFdpub fn new(fd: RawFd, events: EventFlags) -> PollFd[src]
pub fn new(fd: RawFd, events: EventFlags) -> PollFdCreates a new PollFd specifying the events of interest
for a given file descriptor.
pub fn revents(&self) -> Option<EventFlags>[src]
pub fn revents(&self) -> Option<EventFlags>Returns the events that occured in the last call to poll or ppoll.
Trait Implementations
impl Clone for PollFd[src]
impl Clone for PollFdfn clone(&self) -> PollFd[src]
fn clone(&self) -> PollFdReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Copy for PollFd[src]
impl Copy for PollFdimpl Debug for PollFd[src]
impl Debug for PollFd