Struct linux_stat::raw::StatXAttr
source · #[repr(transparent)]pub struct StatXAttr(_);
Expand description
A set of ORed flags that indicate additional attributes of the file. Note that any attribute that is not indicated as supported by stx_attributes_mask has no usable value here. The bits in stx_attributes_mask correspond bit-by-bit to stx_attributes.
Implementations§
source§impl StatXAttr
impl StatXAttr
sourcepub const COMPRESSED: Self = _
pub const COMPRESSED: Self = _
The file is compressed by the filesystem and may take extra resources to access
sourcepub const IMMUTABLE: Self = _
pub const IMMUTABLE: Self = _
The file cannot be modified: it cannot be deleted or renamed, no hard links can be created to this file and no data can be written to it. See chattr(1).
sourcepub const APPEND: Self = _
pub const APPEND: Self = _
The file can only be opened in append mode for writing. Random access writing is not permitted. See chattr(1).
sourcepub const NODUMP: Self = _
pub const NODUMP: Self = _
File is not a candidate for backup when a backup program such as dump(8) is run. See chattr(1).
sourcepub const ENCRYPTED: Self = _
pub const ENCRYPTED: Self = _
A key is required for the file to be encrypted by the filesystem.
pub const AUTOMOUNT: Self = _
pub const MOUNT_ROOT: Self = _
sourcepub const VERITY: Self = _
pub const VERITY: Self = _
The file has fs-verity enabled. It cannot be written to, and all reads from it will be verified against a cryptographic hash that covers the entire file (e.g., via a Merkle tree).
sourcepub const DAX: Self = _
pub const DAX: Self = _
The file is in the DAX (cpu direct access) state. DAX state attempts to minimize software cache effects for both I/O and memory mappings of this file. It requires a file system which has been configured to support DAX.
DAX generally assumes all accesses are via CPU load / store instructions which can minimize overhead for small accesses, but may adversely affect CPU utilization for large transfers.
File I/O is done directly to/from user-space buffers and memory mapped I/O may be performed with direct memory mappings that bypass the kernel page cache.
While the DAX property tends to result in data being transferred synchronously, it does not give the same guarantees as the O_SYNC flag (see open(2)), where data and the necessary metadata are transferred together.
A DAX file may support being mapped with the MAP_SYNC flag, which enables a program to use CPU cache flush instructions to persist CPU store operations without an explicit fsync(2). See mmap(2) for more information
pub const fn empty() -> Self
pub const fn all() -> Self
pub const fn from_bits(bits: u64) -> Self
pub const fn bits(&self) -> u64
pub const fn contains(&self, other: Self) -> bool
pub fn remove(&mut self, other: Self)
pub fn insert(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
Methods from Deref<Target = u64>§
pub const MIN: u64 = 0u64
pub const MAX: u64 = 18_446_744_073_709_551_615u64
pub const BITS: u32 = 64u32
Trait Implementations§
source§impl BitAndAssign<StatXAttr> for StatXAttr
impl BitAndAssign<StatXAttr> for StatXAttr
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&=
operation. Read moresource§impl BitAndAssign<u64> for StatXAttr
impl BitAndAssign<u64> for StatXAttr
source§fn bitand_assign(&mut self, rhs: u64)
fn bitand_assign(&mut self, rhs: u64)
&=
operation. Read moresource§impl BitOrAssign<StatXAttr> for StatXAttr
impl BitOrAssign<StatXAttr> for StatXAttr
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moresource§impl BitOrAssign<u64> for StatXAttr
impl BitOrAssign<u64> for StatXAttr
source§fn bitor_assign(&mut self, rhs: u64)
fn bitor_assign(&mut self, rhs: u64)
|=
operation. Read moresource§impl Ord for StatXAttr
impl Ord for StatXAttr
source§impl PartialEq<StatXAttr> for StatXAttr
impl PartialEq<StatXAttr> for StatXAttr
source§impl PartialOrd<StatXAttr> for StatXAttr
impl PartialOrd<StatXAttr> for StatXAttr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more