pub struct FileIdentity {
pub path: PathBuf,
pub len: u64,
pub modified: SystemTime,
pub changed: Option<(i64, i64)>,
}Expand description
The on-disk identity a recorded file digest describes.
The same trade [VerifiedBlob] makes for CAS reads, offered to shims for
the files they hash: an overwrite moves the modification time and a
truncation changes the length, so a digest recorded against both stands
until either does. Where the platform reports a metadata-change time the
identity carries that too, and it is the part a writer cannot restore: a
rewrite that puts the modification time back still moves the change time,
so only filesystems without one fall back to the freshness model the
surrounding build tool already lives on.
Fields§
§path: PathBufAbsolute path of the file.
len: u64Length of the file in bytes.
modified: SystemTimeModification time of the file.
changed: Option<(i64, i64)>Platform metadata-change token, where one exists.
Implementations§
Trait Implementations§
Source§impl Clone for FileIdentity
impl Clone for FileIdentity
Source§fn clone(&self) -> FileIdentity
fn clone(&self) -> FileIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileIdentity
impl Debug for FileIdentity
Source§impl<'de> Deserialize<'de> for FileIdentity
impl<'de> Deserialize<'de> for FileIdentity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FileIdentity
Source§impl PartialEq for FileIdentity
impl PartialEq for FileIdentity
Source§impl Serialize for FileIdentity
impl Serialize for FileIdentity
impl StructuralPartialEq for FileIdentity
Auto Trait Implementations§
impl Freeze for FileIdentity
impl RefUnwindSafe for FileIdentity
impl Send for FileIdentity
impl Sync for FileIdentity
impl Unpin for FileIdentity
impl UnsafeUnpin for FileIdentity
impl UnwindSafe for FileIdentity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more