Skip to main content

RecoveryAdvice

Struct RecoveryAdvice 

Source
pub struct RecoveryAdvice {
    pub kind: &'static str,
    pub error: String,
    pub hint: String,
    pub unsafe_condition: String,
    pub would_change: String,
    pub preserved: String,
    pub primary_command: String,
    pub recovery_commands: Vec<String>,
    pub extra_json_fields: Map<String, Value>,
}

Fields§

§kind: &'static str§error: String§hint: String§unsafe_condition: String§would_change: String§preserved: String§primary_command: String§recovery_commands: Vec<String>§extra_json_fields: Map<String, Value>

Implementations§

Source§

impl RecoveryAdvice

Source

pub fn safety_refusal( kind: &'static str, error: impl Into<String>, hint: impl Into<String>, unsafe_condition: impl Into<String>, would_change: impl Into<String>, already_preserved: impl Into<String>, primary_command: impl Into<String>, recovery_commands: Vec<String>, ) -> Self

Source

pub fn dirty_worktree( action: &str, dirty_paths: Vec<String>, already_preserved: impl Into<String>, ) -> Self

Source

pub fn git_head_mismatch( action: &str, current_oid: impl Into<String>, expected_oid: impl Into<String>, branch: impl Into<String>, dirty_paths: Vec<String>, ) -> Self

Source

pub fn destructive_requires_force( action: &str, unsafe_condition: impl Into<String>, would_change: impl Into<String>, preview_command: impl Into<String>, force_command: impl Into<String>, already_preserved: impl Into<String>, ) -> Self

Source

pub fn op_id_conflict( command: &str, dedup_scope: &str, incoming_argv: &[String], incoming_request_hash: [u8; 32], existing: Option<DedupConflictMetadata>, ) -> Self

Source

pub fn op_id_in_flight() -> Self

Source

pub fn op_id_unsupported(command: &str) -> Self

Source

pub fn op_id_invalid(raw: &str, parse_error: impl Display) -> Self

Source

pub fn json_unsupported(command: &str) -> Self

Source

pub fn json_compact_unsupported(command: &str) -> Self

Source

pub fn stale_daemon_protocol(their_version: u32, our_version: u32) -> Self

Source

pub fn git_import_metadata_required(map_path: &str, git_path: &str) -> Self

Source

pub fn adopt_path_conflict(positional: &str, repo_path: &str) -> Self

Source

pub fn adopt_requires_git_worktree(details: Option<String>) -> Self

Source

pub fn git_overlay_tip_bind_failed(details: impl Into<String>) -> Self

Source

pub fn init_path_conflict(positional: &str, repo_path: &str) -> Self

Source

pub fn init_principal_field_required(field: &str) -> Self

Source

pub fn hook_veto(hook: &str, action: &str, reason: impl Into<String>) -> Self

Source

pub fn invalid_usage( kind: &'static str, error: impl Into<String>, hint: impl Into<String>, primary_command: impl Into<String>, ) -> Self

Source

pub fn missing_option( kind: &'static str, option: &'static str, required_for: &'static str, primary_command: impl Into<String>, ) -> Self

Source

pub fn malformed_option_value( kind: &'static str, option: &'static str, raw: &str, expected: &'static str, primary_command: impl Into<String>, ) -> Self

Source

pub fn discuss_resolve_missing_dismiss_reason() -> Self

Source

pub fn review_symbols_malformed(raw: &str) -> Self

Source

pub fn thread_absorb_parent_required(thread: &str) -> Self

Source

pub fn repository_no_head_capture_first(action: &str) -> Self

Source

pub fn repository_no_head_anchor_first(action: &str) -> Self

Source

pub fn context_empty() -> Self

Source

pub fn annotation_not_found(annotation_id: &str) -> Self

Source

pub fn no_current_thread( command: &'static str, explicit_selector: Option<&'static str>, primary_command: impl Into<String>, ) -> Self

Source

pub fn no_current_session( command: &'static str, explicit_selector: Option<&'static str>, primary_command: impl Into<String>, ) -> Self

Source

pub fn thread_worktree_unavailable( thread: &str, action: &str, unsafe_condition: impl Into<String>, primary_command: impl Into<String>, ) -> Self

Source

pub fn land_checkpoint_partial_failure( thread: &str, checkpoint_error: impl Display, performed_steps: Vec<String>, ) -> Self

Source

pub fn land_checkpoint_rolled_back( thread: &str, checkpoint_error: impl Display, performed_steps: Vec<String>, ) -> Self

Source

pub fn land_checkpoint_partial_failure_undo_failed( thread: &str, checkpoint_error: impl Display, undo_error: impl Display, performed_steps: Vec<String>, ) -> Self

Source

pub fn land_checkpoint_recovery_required( thread: &str, checkpoint_error: impl Display, recovery_error: impl Display, performed_steps: Vec<String>, ) -> Self

Source

pub fn land_checkpoint_rollback_marker_cleanup_failed( thread: &str, checkpoint_error: impl Display, cleanup_error: impl Display, performed_steps: Vec<String>, ) -> Self

Source

pub fn from_git_projection_error(error: &GitProjectionError) -> Option<Self>

Source

pub fn git_heddle_thread_diverged(thread: &str, branch: &str) -> Self

Source

pub fn remote_transport_mismatch(action: &str, remote: &str) -> Self

Source

pub fn remote_not_configured(action: &str) -> Self

Source

pub fn remote_not_found(name: &str) -> Self

Source

pub fn local_lazy_pull_unsupported(source_path: &Path) -> Self

Source

pub fn remote_push_failed(track_name: &str, error: &str) -> Self

Source

pub fn remote_pull_failed( remote_thread: &str, local_thread: Option<&str>, error: &str, ) -> Self

Source

pub fn network_clone_failed(error: &str, local_path: &Path) -> Self

Source

pub fn missing_target_thread(thread_id: &str, attempted_verb: &str) -> Self

thread refresh was asked to refresh a thread that has no recorded target_thread. The thread metadata lives on disk but the integration target was never written, so the refresh has no concrete destination to rebase onto.

Surfaces Priya’s #1 untyped error site: the bare Thread '<id>' has no target thread line gave the operator no next step. The typed envelope hands back the inspection commands (heddle thread show, heddle thread list) and the re-configuration command shape so the JSON envelope’s recovery_action_templates field carries executable argv.

Source

pub fn rebase_referenced_state_missing(state_id: &str, role: &str) -> Self

A rebase replay step referenced a state, commit, or tree the object store no longer has. Usually means a pruning operation ran between rebase start and rebase resume, or the persisted REBASE_STATE references objects from a sibling repository. Abort recovers — the tolerant loader will rewind to original_head without needing the missing objects.

Source

pub fn rebase_state_corrupted(field: &str, detail: impl Display) -> Self

A persisted REBASE_STATE file could not be parsed or violated an invariant. The strict loader (used by --continue) hard-fails so a half-applied batch never reaches the oplog; the tolerant loader (used by --abort) absorbs most of these cases and rewinds to original_head.

field describes which part of REBASE_STATE failed validation (e.g. "Missing 'onto'", "decode pending_advance", "Inconsistent rebase state"); detail carries the underlying cause when there is one (e.g. a hex/msgpack decode error) and may be empty. Tests assert on the field substring, so the user- visible error always starts with field.

Source

pub fn thread_referenced_state_missing(state_id: &str, role: &str) -> Self

A thread command resolved a state spec or anchor and the referenced state was not in the object store. Distinct from state_not_found because the lookup happens inside thread command flow (start/create/anchor) rather than the generic state resolver.

Source

pub fn thread_checkout_unavailable( thread_name: &str, attempted_verb: &str, ) -> Self

--print-cd-path (or another path-only output mode) was passed to a thread command but the thread has no on-disk worktree to cd into. Lightweight (non-materialized) threads do not own a directory — the operator needs to materialize the thread or use a different command that doesn’t require a checkout path.

Source

pub fn primary_hint(&self) -> &str

Trait Implementations§

Source§

impl Clone for RecoveryAdvice

Source§

fn clone(&self) -> RecoveryAdvice

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecoveryAdvice

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for RecoveryAdvice

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Error for RecoveryAdvice

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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<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