pub enum SandboxError {
RootNotFound {
path: String,
},
RootNotDirectory {
path: String,
},
RootCanonicalizationFailed {
path: String,
reason: String,
},
ParentTraversal {
path: String,
},
AbsolutePath {
path: String,
},
EscapeAttempt {
path: String,
root: String,
},
SymlinkNotAllowed {
path: String,
},
HardlinkNotAllowed {
path: String,
},
PathCanonicalizationFailed {
path: String,
reason: String,
},
}Expand description
Errors that can occur during path sandbox operations.
These errors indicate security violations when paths attempt to escape their designated sandbox root.
Variants§
RootNotFound
The sandbox root path does not exist
RootNotDirectory
The sandbox root path is not a directory
RootCanonicalizationFailed
Failed to canonicalize the sandbox root path
ParentTraversal
Path contains “..” traversal components
AbsolutePath
Path is absolute and not within the sandbox root
EscapeAttempt
Path resolves outside the sandbox root
SymlinkNotAllowed
Path is or contains a symlink (when symlinks are not allowed)
HardlinkNotAllowed
Path is or contains a hardlink (when hardlinks are not allowed)
PathCanonicalizationFailed
Failed to canonicalize the joined path
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 PartialEq for SandboxError
impl PartialEq for SandboxError
impl Eq for SandboxError
impl StructuralPartialEq for SandboxError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.