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

source

pub const COMPRESSED: Self = _

The file is compressed by the filesystem and may take extra resources to access

source

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).

source

pub const APPEND: Self = _

The file can only be opened in append mode for writing. Random access writing is not permitted. See chattr(1).

source

pub const NODUMP: Self = _

File is not a candidate for backup when a backup program such as dump(8) is run. See chattr(1).

source

pub const ENCRYPTED: Self = _

A key is required for the file to be encrypted by the filesystem.

source

pub const AUTOMOUNT: Self = _

source

pub const MOUNT_ROOT: Self = _

source

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).

source

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

source

pub const fn empty() -> Self

source

pub const fn all() -> Self

source

pub const fn from_bits(bits: u64) -> Self

source

pub const fn bits(&self) -> u64

source

pub const fn contains(&self, other: Self) -> bool

source

pub fn remove(&mut self, other: Self)

source

pub fn insert(&mut self, other: Self)

source

pub fn toggle(&mut self, other: Self)

Methods from Deref<Target = u64>§

1.43.0 · source

pub const MIN: u64 = 0u64

1.43.0 · source

pub const MAX: u64 = 18_446_744_073_709_551_615u64

1.53.0 · source

pub const BITS: u32 = 64u32

Trait Implementations§

source§

impl AsRef<u64> for StatXAttr

source§

fn as_ref(&self) -> &u64

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl BitAnd<StatXAttr> for StatXAttr

§

type Output = StatXAttr

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self

Performs the & operation. Read more
source§

impl BitAnd<u64> for StatXAttr

§

type Output = StatXAttr

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: u64) -> Self

Performs the & operation. Read more
source§

impl BitAndAssign<StatXAttr> for StatXAttr

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl BitAndAssign<u64> for StatXAttr

source§

fn bitand_assign(&mut self, rhs: u64)

Performs the &= operation. Read more
source§

impl BitOr<StatXAttr> for StatXAttr

§

type Output = StatXAttr

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self

Performs the | operation. Read more
source§

impl BitOr<u64> for StatXAttr

§

type Output = StatXAttr

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: u64) -> Self

Performs the | operation. Read more
source§

impl BitOrAssign<StatXAttr> for StatXAttr

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl BitOrAssign<u64> for StatXAttr

source§

fn bitor_assign(&mut self, rhs: u64)

Performs the |= operation. Read more
source§

impl Borrow<u64> for StatXAttr

source§

fn borrow(&self) -> &u64

Immutably borrows from an owned value. Read more
source§

impl Clone for StatXAttr

source§

fn clone(&self) -> StatXAttr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StatXAttr

source§

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

Formats the value using the given formatter. Read more
source§

impl Deref for StatXAttr

§

type Target = u64

The resulting type after dereferencing.
source§

fn deref(&self) -> &u64

Dereferences the value.
source§

impl From<StatXAttr> for u64

source§

fn from(value: StatXAttr) -> Self

Converts to this type from the input type.
source§

impl From<u64> for StatXAttr

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl Hash for StatXAttr

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for StatXAttr

source§

fn cmp(&self, other: &StatXAttr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<StatXAttr> for StatXAttr

source§

fn eq(&self, other: &StatXAttr) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<StatXAttr> for StatXAttr

source§

fn partial_cmp(&self, other: &StatXAttr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for StatXAttr

source§

impl Eq for StatXAttr

source§

impl StructuralEq for StatXAttr

source§

impl StructuralPartialEq for StatXAttr

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.