pub struct DataDirectory { /* private fields */ }Expand description
An exclusively owned Hyphae data directory.
The operating-system lock is held until this value is dropped. Opening the same directory for a second writer fails instead of relying on cooperative process behavior.
Implementations§
Source§impl DataDirectory
impl DataDirectory
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self, DataDirectoryError>
pub fn open(path: impl AsRef<Path>) -> Result<Self, DataDirectoryError>
Opens an existing data directory or initializes a new one.
§Errors
Returns an error when the directory cannot be initialized, is owned by another writer, has a malformed marker, or uses a future format.
Sourcepub fn active_log_path(&self) -> PathBuf
pub fn active_log_path(&self) -> PathBuf
Returns the path of the active append-only log segment.
Trait Implementations§
Source§impl Debug for DataDirectory
impl Debug for DataDirectory
Source§impl Drop for DataDirectory
impl Drop for DataDirectory
Auto Trait Implementations§
impl Freeze for DataDirectory
impl RefUnwindSafe for DataDirectory
impl Send for DataDirectory
impl Sync for DataDirectory
impl Unpin for DataDirectory
impl UnsafeUnpin for DataDirectory
impl UnwindSafe for DataDirectory
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