pub struct FileIdentity { /* private fields */ }Expand description
A filesystem object’s identity: the record’s 128-bit file ID, optionally qualified by the volume it lives on.
A file ID is unique only within a volume, so the same ID may name different
objects on different volumes. An unqualified identity is therefore not
globally meaningful and must not be compared across volumes;
is_volume_qualified reports which kind this is.
The 16 identifier bytes are kept exactly as the record reported them. They
are deliberately not folded into a u128, which would impose an endianness
the native value does not have.
Implementations§
Source§impl FileIdentity
impl FileIdentity
Sourcepub const fn new(id: [u8; 16], volume_serial: Option<u64>) -> Self
pub const fn new(id: [u8; 16], volume_serial: Option<u64>) -> Self
Build an identity from a record’s identifier bytes and, when it was obtained, the volume serial that qualifies them.
Sourcepub const fn volume_serial(&self) -> Option<u64>
pub const fn volume_serial(&self) -> Option<u64>
The volume serial, when the request obtained one.
Sourcepub const fn is_volume_qualified(&self) -> bool
pub const fn is_volume_qualified(&self) -> bool
Whether this identity is globally meaningful.
Trait Implementations§
Source§impl Clone for FileIdentity
impl Clone for FileIdentity
Source§fn clone(&self) -> FileIdentity
fn clone(&self) -> FileIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more