pub enum SandboxError {
Timeout {
timeout: Duration,
},
MemoryExceeded {
limit_mb: u32,
},
ExecutionFailed(String),
InvalidRequest(String),
BackendUnavailable(String),
EnforcerFailed {
enforcer: String,
message: String,
},
EnforcerUnavailable {
enforcer: String,
message: String,
},
PolicyViolation(String),
}Expand description
Errors that can occur during sandbox execution.
All variants include actionable context to help callers diagnose issues.
§Example
use adk_sandbox::SandboxError;
use std::time::Duration;
let err = SandboxError::Timeout { timeout: Duration::from_secs(30) };
assert!(err.to_string().contains("30s"));Variants§
Timeout
Execution exceeded the configured timeout.
MemoryExceeded
Execution exceeded the configured memory limit (Wasm only).
ExecutionFailed(String)
Execution failed due to an internal error (e.g., subprocess I/O failure).
InvalidRequest(String)
The request is invalid (e.g., unsupported language for this backend).
The backend is not available (e.g., missing runtime or feature not enabled).
EnforcerFailed
The sandbox enforcer failed to apply the profile.
Fields
The sandbox enforcer is not available on this system.
PolicyViolation(String)
A policy path or resource could not be resolved.
Trait Implementations§
Source§impl Clone for SandboxError
impl Clone for SandboxError
Source§fn clone(&self) -> SandboxError
fn clone(&self) -> SandboxError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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<Error> for SandboxError
impl From<Error> for SandboxError
Source§impl From<SandboxError> for AdkError
impl From<SandboxError> for AdkError
Source§fn from(err: SandboxError) -> Self
fn from(err: 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 UnsafeUnpin 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