pub enum BackendError {
MemWriter(MemWriterError),
Sealed,
Io(Error),
Other(String),
ParentMismatch {
expected: String,
actual: String,
},
}Expand description
Errors surfaced by MemBackend.
The Sealed variant is the typed read-only signal — backends
that physically cannot write (archive) return it from every
mutating method. Callers (the engine’s mutation pipeline) branch
on the discriminant before reaching the backend; a Sealed
reaching this layer is a programming error in the upstream
capability check.
Variants§
MemWriter(MemWriterError)
Re-thrown from the existing MemWriterError surface so
folder-backend implementations can lift MemWriter
failures without lossy conversion.
Sealed
Backend physically rejects writes. Returned by the archive backend and any future read-only backend (e.g. registry pin).
Io(Error)
Filesystem IO failure outside the MemWriterError path.
Other(String)
Backend-specific failure not modelled by the variants above. Carries an agent-readable message; structured backend errors add their own variant.
ParentMismatch
Parent-ref pinning guard tripped on
MemBackend::commit_with_expected_parent — the backend’s
current head no longer matches the caller’s expected_parent.
A sibling writer (another Engine instance, an out-of-band
git pull, a manual git operation) advanced the on-disk state
between the snapshot the caller pinned and now. The engine
layer maps this into MEM_RELOADED /
RENAME_PARTIAL_FAILURE depending on whether other mems
already committed in the same logical operation. Today only
the git-branch backend (planned override) produces this
variant; folder and archive backends inherit the default impl
of commit_with_expected_parent which delegates to commit
without parent checking.
Trait Implementations§
Source§impl Debug for BackendError
impl Debug for BackendError
Source§impl Display for BackendError
impl Display for BackendError
Source§impl Error for BackendError
impl Error for BackendError
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<BackendError> for EngineError
impl From<BackendError> for EngineError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Source§impl From<Error> for BackendError
impl From<Error> for BackendError
Source§impl From<MemWriterError> for BackendError
impl From<MemWriterError> for BackendError
Source§fn from(source: MemWriterError) -> Self
fn from(source: MemWriterError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for BackendError
impl !UnwindSafe for BackendError
impl Freeze for BackendError
impl Send for BackendError
impl Sync for BackendError
impl Unpin for BackendError
impl UnsafeUnpin for BackendError
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for 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