[][src]Struct syscall::io_uring::v1::IoUringSqeFlags

pub struct IoUringSqeFlags { /* fields omitted */ }

General flags describing a submission entry. Note that these flags are different from the syscall flags in that they describe the io_uring behavior when handling the SQE, rather than configuring the syscall.

Implementations

impl IoUringSqeFlags[src]

pub const DRAIN: IoUringSqeFlags[src]

Complete every command before the current command, prior to executing it.

pub const CHAIN: IoUringSqeFlags[src]

Prevent reordering this command with the command after it.

pub const SUBSCRIBE: IoUringSqeFlags[src]

There can be multiple completions to this submission, each with the extra parameter set to the sequence number. The completion entries share the same user data as the submission, but with a sequence number in extra if supported.

pub const DIRECT_RECV: IoUringSqeFlags[src]

When the command completes, the current process will be awoken immediately, directly a context switch back to the kernel, rather than waiting for every other process to be scheduled first. This lowers latency a lot, especially for IRQs, but obviously takes extra system resources. Hence, it requires elevated privileges.

Note that "immediately" only applies in the userspace-to-kernel mode, since the kernel can context switch to a process whenever it likes to. In the kernel-to-userspace mode, the producer scheme will first have to call the kernel back, or if the process is dedicatedly polled by the kernel, directly after that process's CPU time. This also applies for the userspace-to-userspace scenario, with the exception that the kernel can only know when to context switch by polling.

NOTE: This flag is not implemented yet, and using it will cause ENOSYS. TODO: only for root, or a process capability?

pub const DIRECT_SEND: IoUringSqeFlags[src]

Works similarly to DIRECT_RECV, except it context switches directly (depending on context) to the producer when sent. Also requires elevated privileges. Since the kernel will start serving the commands directly upon SYS_ENTER_IORING, doing this with userspace-to-kernel will result in EINVAL.

pub const fn empty() -> IoUringSqeFlags[src]

Returns an empty set of flags

pub const fn all() -> IoUringSqeFlags[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u8[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u8) -> Option<IoUringSqeFlags>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: u8) -> IoUringSqeFlags[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: u8) -> IoUringSqeFlags[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: IoUringSqeFlags) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: IoUringSqeFlags) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: IoUringSqeFlags)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: IoUringSqeFlags)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: IoUringSqeFlags)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: IoUringSqeFlags, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Binary for IoUringSqeFlags[src]

impl BitAnd<IoUringSqeFlags> for IoUringSqeFlags[src]

type Output = IoUringSqeFlags

The resulting type after applying the & operator.

fn bitand(self, other: IoUringSqeFlags) -> IoUringSqeFlags[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<IoUringSqeFlags> for IoUringSqeFlags[src]

fn bitand_assign(&mut self, other: IoUringSqeFlags)[src]

Disables all flags disabled in the set.

impl BitOr<IoUringSqeFlags> for IoUringSqeFlags[src]

type Output = IoUringSqeFlags

The resulting type after applying the | operator.

fn bitor(self, other: IoUringSqeFlags) -> IoUringSqeFlags[src]

Returns the union of the two sets of flags.

impl BitOrAssign<IoUringSqeFlags> for IoUringSqeFlags[src]

fn bitor_assign(&mut self, other: IoUringSqeFlags)[src]

Adds the set of flags.

impl BitXor<IoUringSqeFlags> for IoUringSqeFlags[src]

type Output = IoUringSqeFlags

The resulting type after applying the ^ operator.

fn bitxor(self, other: IoUringSqeFlags) -> IoUringSqeFlags[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<IoUringSqeFlags> for IoUringSqeFlags[src]

fn bitxor_assign(&mut self, other: IoUringSqeFlags)[src]

Toggles the set of flags.

impl Clone for IoUringSqeFlags[src]

impl Copy for IoUringSqeFlags[src]

impl Debug for IoUringSqeFlags[src]

impl Eq for IoUringSqeFlags[src]

impl Extend<IoUringSqeFlags> for IoUringSqeFlags[src]

impl FromIterator<IoUringSqeFlags> for IoUringSqeFlags[src]

impl Hash for IoUringSqeFlags[src]

impl LowerHex for IoUringSqeFlags[src]

impl Not for IoUringSqeFlags[src]

type Output = IoUringSqeFlags

The resulting type after applying the ! operator.

fn not(self) -> IoUringSqeFlags[src]

Returns the complement of this set of flags.

impl Octal for IoUringSqeFlags[src]

impl Ord for IoUringSqeFlags[src]

impl PartialEq<IoUringSqeFlags> for IoUringSqeFlags[src]

impl PartialOrd<IoUringSqeFlags> for IoUringSqeFlags[src]

impl StructuralEq for IoUringSqeFlags[src]

impl StructuralPartialEq for IoUringSqeFlags[src]

impl Sub<IoUringSqeFlags> for IoUringSqeFlags[src]

type Output = IoUringSqeFlags

The resulting type after applying the - operator.

fn sub(self, other: IoUringSqeFlags) -> IoUringSqeFlags[src]

Returns the set difference of the two sets of flags.

impl SubAssign<IoUringSqeFlags> for IoUringSqeFlags[src]

fn sub_assign(&mut self, other: IoUringSqeFlags)[src]

Disables all flags enabled in the set.

impl UpperHex for IoUringSqeFlags[src]

Auto Trait Implementations

impl Send for IoUringSqeFlags

impl Sync for IoUringSqeFlags

impl Unpin for IoUringSqeFlags

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.