pub struct FolderbaseVersionStore { /* private fields */ }Expand description
Read-only handle for planning Folderbase Version capture.
Implementations§
Source§impl FolderbaseVersionStore
impl FolderbaseVersionStore
Sourcepub fn open(root: impl AsRef<Path>) -> Result<Self, FolderbaseCaptureError>
pub fn open(root: impl AsRef<Path>) -> Result<Self, FolderbaseCaptureError>
Open one exact, existing Folderbase Root without writing any state.
Sourcepub fn plan_capture(&self) -> Result<CapturePlan, FolderbaseCaptureError>
pub fn plan_capture(&self) -> Result<CapturePlan, FolderbaseCaptureError>
Plan a bounded metadata inventory without reading ordinary file bytes.
Source§impl FolderbaseVersionStore
impl FolderbaseVersionStore
Sourcepub fn seal_capture(
&self,
plan: CapturePlan,
) -> Result<SealedCapture, FolderbaseCaptureError>
pub fn seal_capture( &self, plan: CapturePlan, ) -> Result<SealedCapture, FolderbaseCaptureError>
Verify every included byte, install immutable records append-only, and advance this device’s Local Head only after all references verify.
Sourcepub fn read_version(
&self,
version_id: &str,
) -> Result<FolderbaseVersion, FolderbaseCaptureError>
pub fn read_version( &self, version_id: &str, ) -> Result<FolderbaseVersion, FolderbaseCaptureError>
Read one complete append-only Folderbase Version and verify every referenced local Object Version and content blob.
Sourcepub fn restore_tombstone(
&self,
portable_path: &str,
) -> Result<RestoredTombstone, FolderbaseCaptureError>
pub fn restore_tombstone( &self, portable_path: &str, ) -> Result<RestoredTombstone, FolderbaseCaptureError>
Restore the exact ordinary-file bytes named by a Tombstone in the current verified Local Head.
Restore is same-path and no-clobber. It creates one new full-state Folderbase Version and advances Local Head only after the file and all immutable references verify.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FolderbaseVersionStore
impl RefUnwindSafe for FolderbaseVersionStore
impl Send for FolderbaseVersionStore
impl Sync for FolderbaseVersionStore
impl Unpin for FolderbaseVersionStore
impl UnsafeUnpin for FolderbaseVersionStore
impl UnwindSafe for FolderbaseVersionStore
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