pub struct FileIdentity { /* private fields */ }Expand description
Opaque identity of an already-open filesystem object.
Identities are intended only as opaque comparison keys while the relevant file handles remain open. Their ordering carries no filesystem meaning; it exists only for ordered collections. They are not persistent database identifiers and must not be serialized or compared across machines or boots.
Implementations§
Source§impl FileIdentity
impl FileIdentity
Sourcepub fn from_file(file: &File) -> Result<Option<FileIdentity>, Error>
pub fn from_file(file: &File) -> Result<Option<FileIdentity>, Error>
Read the identity of an independently opened filesystem descriptor.
On Unix this uses descriptor metadata (st_dev, st_ino). On Windows
it uses the volume serial number and full 128-bit file identifier
associated with the open handle. A later rename or pathname replacement
therefore does not change the result. Platforms without a stable
descriptor identity exposed by this crate return Ok(None).
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 moreimpl Copy for FileIdentity
Source§impl Debug for FileIdentity
impl Debug for FileIdentity
impl Eq for FileIdentity
Source§impl Hash for FileIdentity
impl Hash for FileIdentity
Source§impl Ord for FileIdentity
impl Ord for FileIdentity
Source§fn cmp(&self, other: &FileIdentity) -> Ordering
fn cmp(&self, other: &FileIdentity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FileIdentity
impl PartialEq for FileIdentity
Source§impl PartialOrd for FileIdentity
impl PartialOrd 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).