pub struct ResolvedAttrs {
pub mode: u32,
pub uid: u32,
pub gid: u32,
pub mode_from: AttrSource,
pub uid_from: AttrSource,
pub gid_from: AttrSource,
}Expand description
The decision, with provenance per field.
Fields§
§mode: u32Permission bits only (0o7777).
uid: u32§gid: u32§mode_from: AttrSource§uid_from: AttrSource§gid_from: AttrSourceImplementations§
Source§impl ResolvedAttrs
impl ResolvedAttrs
Sourcepub fn describe(&self) -> String
pub fn describe(&self) -> String
One-line ASCII summary naming where each value came from, so a put
that inherits 0600 root:root from the file it replaced says so instead
of leaving the user to discover it later.
Sourcepub fn file_mode(&self) -> u32
pub fn file_mode(&self) -> u32
The mode as CreateFileOptions::mode wants it for a regular file —
permission bits OR’d with S_IFREG.
Every driver takes that field as the complete mode (ext, UFS and EFS
default it to 0o100644 and write it straight into the inode), so
handing them bare permission bits would produce an inode with no type.
Going through these two helpers keeps that from being rediscovered.
Sourcepub fn is_all_fallback(&self) -> bool
pub fn is_all_fallback(&self) -> bool
True when every field fell through to its last-resort value — the case
worth warning about, because it is the old silent root:root 0644.