Skip to main content

Committer

Struct Committer 

Source
pub struct Committer { /* private fields */ }
Expand description

Capability-rooted workspace snapshot, revalidation, commit, and recovery engine.

Implementations§

Source§

impl Committer

Source

pub fn open( workspace_root: impl AsRef<Path>, blobs: BlobStore, config: CommitConfig, ) -> Result<Self, CommitError>

Open one ambient workspace boundary and create its protected runtime directory.

§Errors

Returns an error if the root cannot be opened or a reserved internal path is not a real directory.

Source

pub fn open_with_workspace_data( workspace_root: impl AsRef<Path>, config: CommitConfig, ) -> Result<(Self, DataDirectory), CommitError>

Open one workspace and derive its committer and durable data store from the same pinned .vsh-runtime directory capability.

§Errors

Returns an error if any protected directory, coordination file, or blob store cannot be created and verified without following a workspace symlink.

Source

pub fn artifact_store(&self) -> BlobStore

Return a cheap handle to the immutable artifact store owned by this committer.

Source

pub const fn config(&self) -> CommitConfig

Return immutable commit bounds.

Source

pub fn snapshot( &self, limits: SnapshotLimits, ) -> Result<BaseSnapshot, CommitError>

Capture an eager-metadata, lazy-content snapshot below the workspace capability.

§Errors

Returns an error for unsupported nodes, unstable enumeration, or a size bound.

Source

pub fn revalidate( &self, plan: &CommitPlan<'_>, ) -> Result<Vec<RevalidationConflict>, CommitError>

Revalidate exactly the artifact’s ReadSet and WriteSet without mutating the host.

§Errors

Returns an error when safe host observation fails or bounds are exceeded.

Source

pub fn commit<S: TransactionStore + ?Sized>( &self, store: &S, reservation: CommitReservation, plan: &CommitPlan<'_>, ) -> Result<CommitReceipt, CommitError>

Consume a reservation and commit one exact artifact with production fault policy.

§Errors

Returns a stale, binding, I/O, or recovery-required error. Once mutation begins, failures preserve durable recovery obligations.

Source

pub fn commit_with_faults<S, F>( &self, store: &S, reservation: CommitReservation, plan: &CommitPlan<'_>, faults: &F, ) -> Result<CommitReceipt, CommitError>

Commit with an explicit durable-boundary fault injector.

This is public so downstream crash harnesses can validate filesystem/platform behavior without private hooks.

§Errors

Returns the same errors as Self::commit, plus injected failures.

Source

pub fn recover<S: TransactionStore + ?Sized>( &self, store: &S, ) -> Result<RecoveryReport, CommitError>

Recover every durable transaction workspace under this capability root.

Completed-marker transactions are finalized; interrupted ones are rolled back in reverse order. Ambiguous ownership is reported and never deleted.

§Errors

Returns an error for corrupt journals, unsafe state transitions, or host I/O.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.