MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / ApplyError

Enum ApplyError

atomic-core/src/crdt/apply/error.rs:96–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94/// - [`is_recoverable()`](ApplyError::is_recoverable) - Can retry or continue
95#[derive(Debug)]
96pub enum ApplyError {
97 // Not Found Errors
98 /// Referenced trunk (file) does not exist.
99 ///
100 /// This occurs when an operation references a TrunkId that hasn't been
101 /// created or has been permanently removed.
102 TrunkNotFound {
103 /// The trunk ID that was not found.
104 trunk_id: TrunkId,
105 },
106
107 /// Referenced branch (line) does not exist.
108 ///
109 /// This occurs when an operation references a BranchId that hasn't been
110 /// created or has been permanently removed.
111 BranchNotFound {
112 /// The branch ID that was not found.
113 branch_id: BranchId,
114 },
115
116 /// Referenced leaf (token) does not exist.
117 ///
118 /// This occurs when an operation references a LeafId that hasn't been
119 /// created or has been permanently removed.
120 LeafNotFound {
121 /// The leaf ID that was not found.
122 leaf_id: LeafId,
123 },
124
125 /// File path does not exist in the repository.
126 ///
127 /// This occurs when trying to operate on a file by path that doesn't
128 /// exist in the PATH_TRUNK lookup table.
129 PathNotFound {
130 /// The path that was not found.
131 path: String,
132 },
133
134 // Already Exists Errors
135 /// Trunk with this ID already exists.
136 ///
137 /// This occurs when attempting to create a trunk with an ID that's
138 /// already in use. CRDT IDs must be globally unique.
139 TrunkAlreadyExists {
140 /// The trunk ID that already exists.
141 trunk_id: TrunkId,
142 },
143
144 /// Branch with this ID already exists.
145 ///
146 /// This occurs when attempting to create a branch with an ID that's
147 /// already in use. CRDT IDs must be globally unique.
148 BranchAlreadyExists {
149 /// The branch ID that already exists.
150 branch_id: BranchId,
151 },
152
153 /// Leaf with this ID already exists.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected