pub enum SandboxError {
InvalidRequest {
message: String,
},
UnsupportedAgent {
agent: String,
},
AgentNotInstalled {
agent: String,
},
InstallFailed {
agent: String,
stderr: Option<String>,
},
AgentProcessExited {
agent: String,
exit_code: Option<i32>,
stderr: Option<String>,
},
TokenInvalid {
message: Option<String>,
},
PermissionDenied {
message: Option<String>,
},
SessionNotFound {
session_id: String,
},
SessionAlreadyExists {
session_id: String,
},
ModeNotSupported {
agent: String,
mode: String,
},
StreamError {
message: String,
},
Timeout {
message: Option<String>,
},
}Variants§
InvalidRequest
UnsupportedAgent
AgentNotInstalled
InstallFailed
AgentProcessExited
TokenInvalid
PermissionDenied
SessionNotFound
SessionAlreadyExists
ModeNotSupported
StreamError
Timeout
Implementations§
Source§impl SandboxError
impl SandboxError
pub fn error_type(&self) -> ErrorType
pub fn to_agent_error(&self) -> AgentError
pub fn to_problem_details(&self) -> ProblemDetails
Trait Implementations§
Source§impl Debug for SandboxError
impl Debug for SandboxError
Source§impl Display for SandboxError
impl Display for SandboxError
Source§impl Error for SandboxError
impl Error for SandboxError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<&SandboxError> for AgentError
impl From<&SandboxError> for AgentError
Source§fn from(value: &SandboxError) -> Self
fn from(value: &SandboxError) -> Self
Converts to this type from the input type.
Source§impl From<&SandboxError> for ProblemDetails
impl From<&SandboxError> for ProblemDetails
Source§fn from(value: &SandboxError) -> Self
fn from(value: &SandboxError) -> Self
Converts to this type from the input type.
Source§impl From<SandboxError> for AgentError
impl From<SandboxError> for AgentError
Source§fn from(value: SandboxError) -> Self
fn from(value: SandboxError) -> Self
Converts to this type from the input type.
Source§impl From<SandboxError> for ProblemDetails
impl From<SandboxError> for ProblemDetails
Source§fn from(value: SandboxError) -> Self
fn from(value: SandboxError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SandboxError
impl RefUnwindSafe for SandboxError
impl Send for SandboxError
impl Sync for SandboxError
impl Unpin for SandboxError
impl UnwindSafe for SandboxError
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
Mutably borrows from an owned value. Read more