Struct linux_io::poll::PollRequest
source · #[repr(C)]pub struct PollRequest<'a> { /* private fields */ }
Expand description
A request for events related to a particular file descriptor in a call to
poll
.
Implementations§
source§impl<'a> PollRequest<'a>
impl<'a> PollRequest<'a>
sourcepub const fn new<'f: 'a>(file: &'f File) -> Self
pub const fn new<'f: 'a>(file: &'f File) -> Self
Begin constructing a PollRequest
that describes events to request
for the given file to use in a subsequent call to poll
.
The the given file must outlive the returned poll request.
sourcepub unsafe fn events_raw(self, bitmask: c_short) -> Self
pub unsafe fn events_raw(self, bitmask: c_short) -> Self
Directly set the events bitmask for this request.
Safety: The given bitmask must be a valid value for the events
field of struct pollfd
in the kernel’s C API.
sourcepub unsafe fn or_events_raw(self, bitmask: c_short) -> Self
pub unsafe fn or_events_raw(self, bitmask: c_short) -> Self
Merge the given events bitmask with the existing event bits in the object using the bitwise OR operation.
Safety: The given bitmask must be a valid value for the events
field of struct pollfd
in the kernel’s C API.