#[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.
Sourcepub fn response(&self) -> PollResponse
pub fn response(&self) -> PollResponse
Auto Trait Implementations§
impl<'a> !Freeze for PollRequest<'a>
impl<'a> !RefUnwindSafe for PollRequest<'a>
impl<'a> Send for PollRequest<'a>
impl<'a> !Sync for PollRequest<'a>
impl<'a> Unpin for PollRequest<'a>
impl<'a> UnwindSafe for PollRequest<'a>
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