pub struct AttrUpdate {
pub mode: Option<u32>,
pub uid: Option<u32>,
pub gid: Option<u32>,
pub size: Option<u64>,
pub mtime_sec: Option<i64>,
}Expand description
Optional fields a caller may update via
PlatformShell::set_attrs. Every field is Option<_>; None
means “leave alone” (the kernel passes None for slots the
chmod/chown/truncate/utimensat call didn’t touch).
Heddle’s tree model only carries three modes (FileMode::Normal,
FileMode::Executable, FileMode::Symlink) — see
crates/objects/src/object/tree_types.rs. A chmod that flips
the user-executable bit (0o100) maps to the closest mode; bits
outside that don’t persist across capture.
Fields§
§mode: Option<u32>New unix mode bits (including the type bits). When set, the
shell folds the user-executable bit into the captured
FileMode; other bits don’t persist.
uid: Option<u32>New uid. The mount has no per-node uid storage (every node
reports the mount-owner’s uid); shells may accept this as a
no-op so chown doesn’t return an error to callers that
don’t actually need ownership tracking.
gid: Option<u32>New gid. Same no-op contract as uid.
size: Option<u64>New size. Truncates the hot-tier buffer (or seeds one from
the durable predecessor and truncates) when set. O_TRUNC
on the kernel side delivers setattr(size=0) before the
first write.
mtime_sec: Option<i64>New mtime in seconds since the UNIX epoch. The overlay has
no per-node mtime storage today; shells accept this as a
no-op so the kernel’s utimensat doesn’t return an error.
Trait Implementations§
Source§impl Clone for AttrUpdate
impl Clone for AttrUpdate
Source§fn clone(&self) -> AttrUpdate
fn clone(&self) -> AttrUpdate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more