pub enum Error {
Inactive,
Io {
action: String,
path: Option<PathBuf>,
source: Error,
},
NotRelative {
path: PathBuf,
},
Escapes {
path: PathBuf,
},
Other(Box<dyn StdError + Send + Sync>),
}Expand description
Errors returned by Environment operations.
Display is one line by default; the alternate form ({error:#}) appends the underlying cause
chain, so wrapped std::io::Errors surface their real reason.
Variants§
Inactive
A method that requires an active sandbox was called outside of Environment::run.
Io
A filesystem or environment operation failed. action describes what was attempted and path
names the target when there is one.
Fields
NotRelative
A create_* / write_file path was absolute; sandbox paths must be relative.
Escapes
A path resolved outside the sandbox directory (e.g. it contained a .. component).
Other(Box<dyn StdError + Send + Sync>)
A user error ?-converted from inside a run closure.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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