pub enum ToriiError {
Show 19 variants
Git(Error),
Io(Error),
RepositoryNotFound(String),
BranchNotFound(String),
Snapshot(String),
Mirror(String),
Serialization(Error),
Other(Error),
InvalidConfig(String),
Network {
provider: String,
message: String,
},
PlatformApi {
provider: String,
status: u16,
message: String,
},
Auth {
provider: String,
message: String,
},
MalformedResponse {
provider: String,
message: String,
},
Subprocess {
tool: String,
message: String,
},
Fs(String),
RepoState(String),
Workspace(String),
Unsupported(String),
Usage(String),
}Variants§
Git(Error)
Io(Error)
RepositoryNotFound(String)
BranchNotFound(String)
Snapshot(String)
Mirror(String)
Serialization(Error)
Other(Error)
InvalidConfig(String)
Network
Networking / HTTP transport failure (DNS, connect, timeout, unexpected I/O — not a non-2xx response, see PlatformApi).
PlatformApi
Platform-side rejection — the API returned a non-success status with a structured body.
Auth
Credential / authorisation problem (missing token, expired PAT, 401, scope mismatch). Surfaces separately from “the config file is malformed”.
MalformedResponse
The API answered 2xx but the body wasn’t what we expected (unparseable JSON, missing field, wrong shape). Distinct from PlatformApi: the platform didn’t reject us, it confused us.
Subprocess
An external tool we shell out to (git, gpg, docker, $EDITOR, $SHELL, …) could not be spawned, or exited unsuccessfully.
Fs(String)
Filesystem operation failure with context (what we were doing
and on which path). Wraps the raw io::Error message — use
instead of the bare Io variant when context is available.
RepoState(String)
The repository is in a state that doesn’t allow the requested operation (bare repo, detached/unborn HEAD, mid-rebase, …).
Workspace(String)
Multi-repo workspace bookkeeping problem (unknown workspace, missing member path, malformed workspaces.toml entry).
Unsupported(String)
The platform (or torii) doesn’t support the requested operation — capability gaps (“Bitbucket has no log-erase”), not-yet-wired surfaces, unsupported platform names. The message explains the workaround when one exists.
Usage(String)
The command was invoked incorrectly — missing argument, conflicting flags, a path that isn’t what the verb expects. Message is self-explanatory, no prefix added.
Trait Implementations§
Source§impl Debug for ToriiError
impl Debug for ToriiError
Source§impl Display for ToriiError
impl Display for ToriiError
Source§impl Error for ToriiError
impl Error for ToriiError
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<Error> for ToriiError
impl From<Error> for ToriiError
Source§impl From<Error> for ToriiError
impl From<Error> for ToriiError
Source§impl From<Error> for ToriiError
impl From<Error> for ToriiError
Auto Trait Implementations§
impl !RefUnwindSafe for ToriiError
impl !UnwindSafe for ToriiError
impl Freeze for ToriiError
impl Send for ToriiError
impl Sync for ToriiError
impl Unpin for ToriiError
impl UnsafeUnpin for ToriiError
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.