pub struct DatabaseFileIdentity { /* private fields */ }Expand description
Stable identity of a database root directory (spec §10.1, S1A-003).
Equality and hashing use only the durable directory-handle identity, never
the path text: two paths that resolve to the same directory (symlinks,
.. segments, renamed parents) map to one identity. canonical_path is
retained for diagnostics and error messages.
Implementations§
Source§impl DatabaseFileIdentity
impl DatabaseFileIdentity
Sourcepub fn for_path(root: impl AsRef<Path>) -> Result<Self>
pub fn for_path(root: impl AsRef<Path>) -> Result<Self>
Resolve the stable identity of an existing database root.
The path is canonicalized and pinned through a crate::durable_file::DurableRoot
descriptor so the identity is read from the directory handle itself.
Sourcepub fn from_durable_root(root: &DurableRoot) -> Result<Self>
pub fn from_durable_root(root: &DurableRoot) -> Result<Self>
Build an identity from an already-pinned durable root.
Sourcepub fn canonical_path(&self) -> &Path
pub fn canonical_path(&self) -> &Path
Canonical path of the root at identity resolution time. Diagnostics only — never use this as the identity itself.
Trait Implementations§
Source§impl Clone for DatabaseFileIdentity
impl Clone for DatabaseFileIdentity
Source§fn clone(&self) -> DatabaseFileIdentity
fn clone(&self) -> DatabaseFileIdentity
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 DatabaseFileIdentity
impl Debug for DatabaseFileIdentity
Source§impl Display for DatabaseFileIdentity
impl Display for DatabaseFileIdentity
impl Eq for DatabaseFileIdentity
Source§impl Hash for DatabaseFileIdentity
impl Hash for DatabaseFileIdentity
Auto Trait Implementations§
impl Freeze for DatabaseFileIdentity
impl RefUnwindSafe for DatabaseFileIdentity
impl Send for DatabaseFileIdentity
impl Sync for DatabaseFileIdentity
impl Unpin for DatabaseFileIdentity
impl UnsafeUnpin for DatabaseFileIdentity
impl UnwindSafe for DatabaseFileIdentity
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more