pub enum Error {
Show 21 variants
NotAWorkspace(PathBuf),
WorkspaceExists(PathBuf),
NestedWorkspace(PathBuf),
AlreadyAttached,
LfsSourceUnsupported,
NoActorConfigured,
SessionNotFound(String),
SessionClosed {
id: String,
state: String,
},
RequestNotFound(String),
RequestClosed {
id: String,
state: String,
},
RequestParked(String),
SelfApprovalForbidden,
ApprovalsDismissed {
new_snapshot: String,
},
LeaseHeld {
holder: String,
expires_at_ms: i64,
},
PathOutsideWorkingCopy(String),
NotText(String),
WindowTooLarge {
max: usize,
},
PackageFailed {
package: String,
reason: String,
},
Engine(String),
Io(Error),
Config(String),
}Expand description
Every way a core operation can fail.
The domain variants are outcomes callers match on by name; the last three wrap a lower layer (the engine, the filesystem, config parsing) whose detail is carried as a message.
Variants§
NotAWorkspace(PathBuf)
The path is not inside an atelier workspace.
WorkspaceExists(PathBuf)
init refused: the path already holds a workspace.
NestedWorkspace(PathBuf)
init refused: the path sits inside an existing workspace.
AlreadyAttached
attach refused: the mount name is already taken.
LfsSourceUnsupported
Adoption refused: the git source uses git-lfs.
NoActorConfigured
No config home names an actor; see resolve_actor.
SessionNotFound(String)
No session carries the given id.
SessionClosed
The session left the open state; the operation needs it open.
RequestNotFound(String)
No landing request carries the given id.
RequestClosed
The landing request left the open state; the operation needs it open.
RequestParked(String)
The landing request hit a conflict and parked.
SelfApprovalForbidden
The workspace’s landing policy forbids self-approval.
ApprovalsDismissed
The change gained a snapshot after approval, so the approvals no longer vouch for what would land.
LeaseHeld
Another actor holds the landing lease.
Fields
PathOutsideWorkingCopy(String)
The path escapes the session’s working copy.
NotText(String)
The file has no projecting package and its bytes are not text.
WindowTooLarge
The requested read window exceeds the maximum.
PackageFailed
A format package failed while handling a document it claimed.
Fields
Engine(String)
An engine-layer failure: jj or SQLite.
Io(Error)
A filesystem failure.
Config(String)
A config-layer failure: TOML or time formatting.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> ErrorExt for T
impl<T> ErrorExt 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