pub enum SecurityError {
Show 16 variants
InvalidPath(PathBuf),
PathTraversal(PathBuf),
PathOutsideAllowed {
path: PathBuf,
allowed: Vec<PathBuf>,
},
InvalidPathCharacters(PathBuf),
SymlinkDetected(PathBuf),
AuthenticationRequired,
InvalidToken,
TokenExpired,
RateLimitExceeded {
retry_after_secs: u64,
},
NullPointer,
MisalignedPointer {
ptr: usize,
required_alignment: usize,
},
SizeOverflow,
BufferTooLarge(usize),
AllocationFailed,
Io(Error),
Config(String),
}Expand description
Security-related errors
Variants§
InvalidPath(PathBuf)
Invalid path provided
PathTraversal(PathBuf)
Path traversal attempt detected
PathOutsideAllowed
Path is outside allowed directories
InvalidPathCharacters(PathBuf)
Path contains invalid characters
SymlinkDetected(PathBuf)
Symlink detected when not allowed
AuthenticationRequired
Authentication required but not provided
InvalidToken
Invalid authentication token
TokenExpired
Token has expired
RateLimitExceeded
Rate limit exceeded
NullPointer
FFI null pointer
MisalignedPointer
FFI misaligned pointer
SizeOverflow
FFI size overflow
BufferTooLarge(usize)
FFI buffer too large
AllocationFailed
Allocation failure
Io(Error)
IO error
Config(String)
Configuration error
Trait Implementations§
Source§impl Debug for SecurityError
impl Debug for SecurityError
Source§impl Display for SecurityError
impl Display for SecurityError
Source§impl Error for SecurityError
impl Error for SecurityError
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 Freeze for SecurityError
impl !RefUnwindSafe for SecurityError
impl Send for SecurityError
impl Sync for SecurityError
impl Unpin for SecurityError
impl !UnwindSafe for SecurityError
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