io_uring::opcode

Struct PollAdd

Source
pub struct PollAdd { /* private fields */ }
Expand description

Poll the specified fd.

Unlike poll or epoll without EPOLLONESHOT, this interface defaults to work in one shot mode. That is, once the poll operation is completed, it will have to be resubmitted.

If multi is set, the poll will work in multi shot mode instead. That means it will repeatedly trigger when the requested event becomes true, and hence multiple CQEs can be generated from this single submission. The CQE flags field will have IORING_CQE_F_MORE set on completion if the application should expect further CQE entries from the original request. If this flag isn’t set on completion, then the poll request has been terminated and no further events will be generated. This mode is available since 5.13.

Implementations§

Source§

impl PollAdd

Source

pub const CODE: u8 = 6u8

The opcode of the operation. This can be passed to Probe::is_supported to check if this operation is supported with the current kernel.

Source

pub fn new(fd: impl UseFixed, flags: u32) -> Self

The bits that may be set in flags are defined in <poll.h>, and documented in poll(2).

Source

pub const fn multi(self, multi: bool) -> Self

Source

pub fn build(self) -> Entry

Trait Implementations§

Source§

impl Debug for PollAdd

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.