pub enum Error {
MissingCommand,
InvalidCwd(PathBuf),
Hardening(Error),
Spawn(Error),
Wait(Error),
SandboxPolicy(Error),
LinuxSandbox(Error),
SandboxMisconfiguration(String),
}Expand description
Errors returned by sandbox runtime operations.
Variants§
MissingCommand
Command argv was empty.
InvalidCwd(PathBuf)
Requested child working directory is not an existing directory.
Hardening(Error)
Process hardening failed.
Spawn(Error)
Child process spawning failed.
Wait(Error)
Waiting for the child process failed.
SandboxPolicy(Error)
Shared sandbox policy is invalid.
LinuxSandbox(Error)
Linux sandbox planning failed.
SandboxMisconfiguration(String)
Sandbox policy or platform setup is invalid.
Implementations§
Source§impl Error
impl Error
Sourcepub const fn missing_command() -> Self
pub const fn missing_command() -> Self
Construct a missing command error.
Sourcepub fn invalid_cwd(cwd: PathBuf) -> Self
pub fn invalid_cwd(cwd: PathBuf) -> Self
Construct an invalid cwd error from the rejected path.
Sourcepub fn sandbox_misconfiguration(message: impl Into<String>) -> Self
pub fn sandbox_misconfiguration(message: impl Into<String>) -> Self
Construct a sandbox misconfiguration error with a descriptive message.
Sourcepub const fn exit_code(&self) -> i32
pub const fn exit_code(&self) -> i32
Return the documented process exit code for this error.
All sandbox errors currently map to SANDBOX_MISCONFIGURATION_EXIT_CODE.
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)>
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()
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
Mutably borrows from an owned value. Read more