pub struct WriteFlags { /* private fields */ }
Expand description
AIO write flags. See io_submit
Implementations§
Source§impl WriteFlags
impl WriteFlags
Sourcepub const APPEND: WriteFlags
pub const APPEND: WriteFlags
Append data to the end of the file. See the description
of the flag of the same name in pwritev2(2)
as well as
the description of O_APPEND in open(2)
. The aio_offset
field is ignored. The file offset is not changed.
Sourcepub const DSYNC: WriteFlags
pub const DSYNC: WriteFlags
Write operation complete according to requirement of
synchronized I/O data integrity. See the description
of the flag of the same name in pwritev2(2)
as well the
description of O_DSYNC
in open(2)
.
Sourcepub const HIPRI: WriteFlags
pub const HIPRI: WriteFlags
High priority request, poll if possible
Sourcepub const NOWAIT: WriteFlags
pub const NOWAIT: WriteFlags
Don’t wait if the I/O will block for operations such as
file block allocations, dirty page flush, mutex locks,
or a congested block device inside the kernel. If any
of these conditions are met, the control block is
returned immediately with a return value of -EAGAIN
in
the res field of the io_event structure.
Sourcepub const SYNC: WriteFlags
pub const SYNC: WriteFlags
Write operation complete according to requirement of
synchronized I/O file integrity. See the description
of the flag of the same name in pwritev2(2)
as well the
description of O_SYNC
in open(2)
.
Sourcepub const fn empty() -> WriteFlags
pub const fn empty() -> WriteFlags
Returns an empty set of flags
Sourcepub const fn all() -> WriteFlags
pub const fn all() -> WriteFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: isize) -> Option<WriteFlags>
pub fn from_bits(bits: isize) -> Option<WriteFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: isize) -> WriteFlags
pub const fn from_bits_truncate(bits: isize) -> WriteFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: isize) -> WriteFlags
pub const unsafe fn from_bits_unchecked(bits: isize) -> WriteFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: WriteFlags) -> bool
pub const fn intersects(&self, other: WriteFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: WriteFlags) -> bool
pub const fn contains(&self, other: WriteFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: WriteFlags)
pub fn insert(&mut self, other: WriteFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: WriteFlags)
pub fn remove(&mut self, other: WriteFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: WriteFlags)
pub fn toggle(&mut self, other: WriteFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: WriteFlags, value: bool)
pub fn set(&mut self, other: WriteFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for WriteFlags
impl Binary for WriteFlags
Source§impl BitAnd for WriteFlags
impl BitAnd for WriteFlags
Source§fn bitand(self, other: WriteFlags) -> WriteFlags
fn bitand(self, other: WriteFlags) -> WriteFlags
Returns the intersection between the two sets of flags.
Source§type Output = WriteFlags
type Output = WriteFlags
&
operator.Source§impl BitAndAssign for WriteFlags
impl BitAndAssign for WriteFlags
Source§fn bitand_assign(&mut self, other: WriteFlags)
fn bitand_assign(&mut self, other: WriteFlags)
Disables all flags disabled in the set.
Source§impl BitOr for WriteFlags
impl BitOr for WriteFlags
Source§fn bitor(self, other: WriteFlags) -> WriteFlags
fn bitor(self, other: WriteFlags) -> WriteFlags
Returns the union of the two sets of flags.
Source§type Output = WriteFlags
type Output = WriteFlags
|
operator.Source§impl BitOrAssign for WriteFlags
impl BitOrAssign for WriteFlags
Source§fn bitor_assign(&mut self, other: WriteFlags)
fn bitor_assign(&mut self, other: WriteFlags)
Adds the set of flags.
Source§impl BitXor for WriteFlags
impl BitXor for WriteFlags
Source§fn bitxor(self, other: WriteFlags) -> WriteFlags
fn bitxor(self, other: WriteFlags) -> WriteFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = WriteFlags
type Output = WriteFlags
^
operator.Source§impl BitXorAssign for WriteFlags
impl BitXorAssign for WriteFlags
Source§fn bitxor_assign(&mut self, other: WriteFlags)
fn bitxor_assign(&mut self, other: WriteFlags)
Toggles the set of flags.
Source§impl Clone for WriteFlags
impl Clone for WriteFlags
Source§fn clone(&self) -> WriteFlags
fn clone(&self) -> WriteFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for WriteFlags
impl Debug for WriteFlags
Source§impl Extend<WriteFlags> for WriteFlags
impl Extend<WriteFlags> for WriteFlags
Source§fn extend<T: IntoIterator<Item = WriteFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = WriteFlags>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<WriteFlags> for WriteFlags
impl FromIterator<WriteFlags> for WriteFlags
Source§fn from_iter<T: IntoIterator<Item = WriteFlags>>(iterator: T) -> WriteFlags
fn from_iter<T: IntoIterator<Item = WriteFlags>>(iterator: T) -> WriteFlags
Source§impl Hash for WriteFlags
impl Hash for WriteFlags
Source§impl LowerHex for WriteFlags
impl LowerHex for WriteFlags
Source§impl Not for WriteFlags
impl Not for WriteFlags
Source§fn not(self) -> WriteFlags
fn not(self) -> WriteFlags
Returns the complement of this set of flags.
Source§type Output = WriteFlags
type Output = WriteFlags
!
operator.Source§impl Octal for WriteFlags
impl Octal for WriteFlags
Source§impl Ord for WriteFlags
impl Ord for WriteFlags
Source§fn cmp(&self, other: &WriteFlags) -> Ordering
fn cmp(&self, other: &WriteFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WriteFlags
impl PartialEq for WriteFlags
Source§impl PartialOrd for WriteFlags
impl PartialOrd for WriteFlags
Source§impl Sub for WriteFlags
impl Sub for WriteFlags
Source§fn sub(self, other: WriteFlags) -> WriteFlags
fn sub(self, other: WriteFlags) -> WriteFlags
Returns the set difference of the two sets of flags.
Source§type Output = WriteFlags
type Output = WriteFlags
-
operator.Source§impl SubAssign for WriteFlags
impl SubAssign for WriteFlags
Source§fn sub_assign(&mut self, other: WriteFlags)
fn sub_assign(&mut self, other: WriteFlags)
Disables all flags enabled in the set.