#[repr(i32)]pub enum ErrorCode {
Unspecified = 0,
NotFound = 1,
NotAuthenticated = 2,
GitError = 3,
IoError = 4,
NetworkError = 5,
InvalidInput = 6,
InternalError = 7,
Timeout = 8,
AlreadyExists = 9,
}Expand description
Standardized error code for programmatic handling across the FFI boundary. Maps to Rust ErrorCode and Haskell FFIErrorCode.
Variants§
Unspecified = 0
Default/unspecified (proto3 requires 0 value)
NotFound = 1
Resource (file, issue, branch, etc.) does not exist.
NotAuthenticated = 2
Missing or invalid credentials (e.g., GitHub token).
GitError = 3
Git command failed (e.g., merge conflict, dirty working directory).
IoError = 4
File system operation failed (e.g., permission denied).
NetworkError = 5
Network request failed (e.g., API unreachable).
InvalidInput = 6
Invalid input parameters provided to the host function.
InternalError = 7
Unexpected internal error (bug in the host function or runtime).
Timeout = 8
Operation timed out.
AlreadyExists = 9
Resource already exists (e.g., worktree path).
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.