pub struct FileIdentity {
pub device: u64,
pub inode: u64,
}Expand description
Native device/inode identity; callers own file-kind admission and persistence.
An identity does not freeze contents or prevent inode reuse after all held descriptors close. It establishes neither confinement nor namespace custody.
Fields§
§device: u64Filesystem device number.
inode: u64Inode number on that device.
Implementations§
Source§impl FileIdentity
impl FileIdentity
Sourcepub fn from_file(file: &File) -> Result<Self>
pub fn from_file(file: &File) -> Result<Self>
Observe a caller-owned regular descriptor without reopening its path.
§Errors
Returns metadata failures or rejects a non-regular descriptor.
Sourcepub fn from_metadata(metadata: &Metadata) -> Self
pub fn from_metadata(metadata: &Metadata) -> Self
Observe native identity from metadata of any file kind.
Callers choose following or no-follow metadata and admit the file kind.
Trait Implementations§
Source§impl Clone for FileIdentity
impl Clone for FileIdentity
impl Copy for FileIdentity
Source§impl Debug for FileIdentity
impl Debug for FileIdentity
impl Eq for FileIdentity
Source§impl PartialEq for FileIdentity
impl PartialEq 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