Skip to main content

SavePlan

Struct SavePlan 

Source
pub struct SavePlan {
Show 16 fields pub verb: SaveVerb, pub intent: Option<String>, pub confidence: Option<f32>, pub attribution: Attribution, pub git_scope: GitScope, pub supplied_tree: Option<Tree>, pub reuse_current_state: bool, pub require_clean_worktree: bool, pub require_worktree_change: bool, pub worktree_status_options: WorktreeStatusOptions, pub run_hooks: bool, pub commit_safe_post_verify: bool, pub coalesce_snapshot_and_checkpoint: bool, pub linearize_git_parent: bool, pub precomputed_worktree_status: Option<Result<Option<WorktreeStatus>>>, pub machine_contract_input: Option<MachineContractInput>,
}
Expand description

Inputs for execute_save. Attribution is resolved by the caller so CLI env/harness/agent precedence stays at the embedding surface.

Fields§

§verb: SaveVerb§intent: Option<String>§confidence: Option<f32>§attribution: Attribution§git_scope: GitScope§supplied_tree: Option<Tree>

When set, snapshot this tree instead of walking the worktree (staged-index commits).

§reuse_current_state: bool

Prefer the current HEAD state when present (checkpoint bootstrap path).

§require_clean_worktree: bool

After ensuring state, refuse dirty Heddle worktree before Git write-through.

§require_worktree_change: bool

Refuse a worktree snapshot whose tree is identical to the current state. The comparison happens during the snapshot tree build, avoiding a separate preflight walk.

§worktree_status_options: WorktreeStatusOptions§run_hooks: bool

Run pre/post snapshot hooks when creating a new Heddle state.

§commit_safe_post_verify: bool

Map post-verify “commit” next actions to heddle status (commit UX).

§coalesce_snapshot_and_checkpoint: bool

Fold snapshot + GitCheckpoint oplog batches into one undo unit.

§linearize_git_parent: bool

Export an unmapped checkpoint state on top of the checkout’s current Git tip. Used only by sequential multi-peer land.

§precomputed_worktree_status: Option<Result<Option<WorktreeStatus>>>

Optional precomputed git-overlay worktree status for verification reuse on the no-new-state path. Post-mutation paths always recompute.

§machine_contract_input: Option<MachineContractInput>

Optional embedding-surface machine-contract inventory. Passing it into core verification lets callers reuse the post-save proof instead of rebuilding the entire repository health envelope for presentation.

Implementations§

Source§

impl SavePlan

Source

pub fn capture(intent: impl Into<String>, attribution: Attribution) -> Self

Source

pub fn commit( intent: impl Into<String>, attribution: Attribution, git_scope: GitScope, ) -> Self

Source

pub fn checkpoint( message: Option<String>, attribution: Attribution, staged: bool, ) -> Self

Source

pub fn with_confidence(self, confidence: Option<f32>) -> Self

Source

pub fn with_supplied_tree(self, tree: Tree) -> Self

Source

pub fn with_worktree_status_options( self, options: WorktreeStatusOptions, ) -> Self

Source

pub fn with_precomputed_worktree_status( self, status: Result<Option<WorktreeStatus>>, ) -> Self

Trait Implementations§

Source§

impl Debug for SavePlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, <T as TryFrom<U>>::Error>

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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more