pub struct SnapshotDatabaseImage { /* private fields */ }Expand description
One uncommitted SQLite image and its sidecar files.
The path remains armed until the operation commits or consumes the image. Failures report cleanup failure instead of leaving a plaintext image behind.
Implementations§
Source§impl SnapshotDatabaseImage
impl SnapshotDatabaseImage
pub fn prepare(path: PathBuf) -> Result<Self, SnapshotImageError>
pub fn create( path: PathBuf, plaintext: &[u8], ) -> Result<Self, SnapshotImageError>
pub fn replace( path: PathBuf, plaintext: &[u8], ) -> Result<Self, SnapshotImageError>
Sourcepub fn read_replay_baseline(
plaintext: &[u8],
snapshot: PublishedStoreSnapshot,
genesis: &ResolvedStoreDeviceState,
) -> Result<InstalledReplayBaseline, SnapshotImageError>
pub fn read_replay_baseline( plaintext: &[u8], snapshot: PublishedStoreSnapshot, genesis: &ResolvedStoreDeviceState, ) -> Result<InstalledReplayBaseline, SnapshotImageError>
Read the exact image’s replay state without installing it in a live database. The replication owner must authenticate acceptance and membership before admission.
pub fn path(&self) -> &Path
Sourcepub fn contains_reclaimable_store_blob(
plaintext: &[u8],
snapshot: &SnapshotMeta,
stored: &StoredBlobRef,
) -> Result<bool, SnapshotImageError>
pub fn contains_reclaimable_store_blob( plaintext: &[u8], snapshot: &SnapshotMeta, stored: &StoredBlobRef, ) -> Result<bool, SnapshotImageError>
The caller authenticates this snapshot’s accepted publication. Its image carries exact Store blob provenance after source packages are retired.
pub async fn read(&self) -> Result<Vec<u8>, SnapshotImageError>
pub fn read_and_discard(self) -> Result<Vec<u8>, SnapshotImageError>
pub fn canonicalize(self) -> Result<Self, SnapshotImageError>
pub fn finish<T>( self, outcome: Result<T, SnapshotImageError>, ) -> Result<T, SnapshotImageError>
pub fn finish_operation<T, E>( self, outcome: Result<T, E>, ) -> Result<T, SnapshotImageOperationError<E>>
pub fn commit(self) -> PathBuf
pub fn install_blob_graph( self, owner: &SnapshotObjectOwner, blobs: &[PreparedSnapshotBlob], pending_store_snapshots: &BTreeSet<ObjectSlot>, ) -> Result<Self, SnapshotImageError>
Trait Implementations§
Source§impl Debug for SnapshotDatabaseImage
impl Debug for SnapshotDatabaseImage
Auto Trait Implementations§
impl Freeze for SnapshotDatabaseImage
impl RefUnwindSafe for SnapshotDatabaseImage
impl Send for SnapshotDatabaseImage
impl Sync for SnapshotDatabaseImage
impl Unpin for SnapshotDatabaseImage
impl UnsafeUnpin for SnapshotDatabaseImage
impl UnwindSafe for SnapshotDatabaseImage
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