pub enum BranchError {
Show 26 variants
InvalidConfig(String),
PermissionDenied(String),
WorkspaceIsolationViolation {
expected: Uuid,
found: Uuid,
},
InvalidBranchName(String),
BranchLimitExceeded,
Database(Error),
Migration(MigrateError),
Io(Error),
Serialization(Error),
BranchNotFound(Uuid),
BranchAlreadyExists(String),
BranchNotActive {
id: Uuid,
status: String,
},
SnapshotFailed {
branch_id: Uuid,
reason: String,
},
SnapshotCorrupt {
branch_id: Uuid,
path: PathBuf,
},
SnapshotHashMissing {
branch_id: Uuid,
path: PathBuf,
},
MergeConflictUnresolved {
entity_ids: Vec<String>,
},
MergeIncompatibleBase {
ours: Uuid,
theirs: Uuid,
reason: String,
},
DagCycle {
from: Uuid,
to: Uuid,
},
CycleDetected {
from: Uuid,
to: Uuid,
},
DagNodeNotFound(Uuid),
DiffFailed {
branch_a: Uuid,
branch_b: Uuid,
reason: String,
},
CommitValidationFailed {
branch_id: Uuid,
violations: Vec<String>,
},
SandboxError(String),
MetricsError(String),
NamingError(String),
OrphanedSnapshot(PathBuf),
}Expand description
Enumerates errors produced by branching, snapshotting, merging, and metrics code.
Variants§
InvalidConfig(String)
Indicates a runtime configuration is invalid.
PermissionDenied(String)
Indicates permission checks denied the operation.
WorkspaceIsolationViolation
Indicates branch data escaped workspace-scoped query isolation.
Fields
InvalidBranchName(String)
Indicates a branch name failed strict path-safe validation.
BranchLimitExceeded
Indicates the workspace has reached its configured branch limit.
Database(Error)
Wraps SQLx database failures.
Migration(MigrateError)
Wraps SQLx migration failures.
Io(Error)
Wraps filesystem errors.
Serialization(Error)
Wraps JSON serialization errors.
BranchNotFound(Uuid)
Indicates a branch lookup failed.
BranchAlreadyExists(String)
Indicates a workspace already has a branch with the same logical name.
BranchNotActive
Indicates an operation requires an active branch.
Fields
SnapshotFailed
Indicates snapshot creation or restore failed.
Fields
SnapshotCorrupt
Indicates a snapshot file failed integrity validation.
Fields
SnapshotHashMissing
Indicates a required snapshot hash sidecar file is missing.
Fields
MergeConflictUnresolved
Indicates merge conflicts were not fully resolved.
MergeIncompatibleBase
Indicates two branches cannot be merged with the selected base.
Fields
DagCycle
Indicates a lineage edge would create a DAG cycle.
CycleDetected
Indicates a branch operation would introduce a lineage cycle.
DagNodeNotFound(Uuid)
Indicates a DAG node lookup failed.
DiffFailed
Indicates diff extraction failed.
Fields
CommitValidationFailed
Indicates a selective commit failed validation.
Fields
SandboxError(String)
Indicates sandbox execution failed.
MetricsError(String)
Indicates metrics handling failed.
NamingError(String)
Indicates a branch name failed validation.
OrphanedSnapshot(PathBuf)
Indicates an orphaned snapshot path was encountered.
Implementations§
Source§impl BranchError
impl BranchError
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Returns true if this error indicates a missing branch or DAG node.
Sourcepub fn is_merge_conflict(&self) -> bool
pub fn is_merge_conflict(&self) -> bool
Returns true if this error represents an unresolved merge conflict.
Sourcepub fn is_snapshot_error(&self) -> bool
pub fn is_snapshot_error(&self) -> bool
Returns true if this error belongs to the snapshot subsystem.
Sourcepub fn is_dag_error(&self) -> bool
pub fn is_dag_error(&self) -> bool
Returns true if this error belongs to DAG management.
Trait Implementations§
Source§impl Debug for BranchError
impl Debug for BranchError
Source§impl Display for BranchError
impl Display for BranchError
Source§impl Error for BranchError
impl Error for BranchError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BranchError> for BranchConfigError
impl From<BranchError> for BranchConfigError
Source§fn from(source: BranchError) -> Self
fn from(source: BranchError) -> Self
Source§impl From<Error> for BranchError
impl From<Error> for BranchError
Source§impl From<Error> for BranchError
impl From<Error> for BranchError
Source§impl From<Error> for BranchError
impl From<Error> for BranchError
Source§impl From<MigrateError> for BranchError
impl From<MigrateError> for BranchError
Source§fn from(source: MigrateError) -> Self
fn from(source: MigrateError) -> Self
Auto Trait Implementations§
impl Freeze for BranchError
impl !RefUnwindSafe for BranchError
impl Send for BranchError
impl Sync for BranchError
impl Unpin for BranchError
impl UnsafeUnpin for BranchError
impl !UnwindSafe for BranchError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more