pub enum SecurityError {
PathNotAllowed {
path: String,
},
PathEscapesWorkspace {
resolved: PathBuf,
},
ForbiddenComponent {
component: String,
},
RateLimitExceeded {
count: usize,
max: u32,
},
ActionBudgetExhausted,
ReadOnlyMode,
SymlinkNotAllowed {
path: PathBuf,
},
InvalidPathFormat {
reason: String,
},
FileTooLarge {
size: u64,
max_size: u64,
},
ForbiddenExtension {
ext: String,
},
}Expand description
Errors that can occur during security policy enforcement
Variants§
PathNotAllowed
Path is not allowed by security policy
PathEscapesWorkspace
Resolved path escapes allowed workspace
ForbiddenComponent
Path contains forbidden component (e.g., parent dir)
RateLimitExceeded
Rate limit exceeded
ActionBudgetExhausted
Action budget exhausted
ReadOnlyMode
Read-only mode
SymlinkNotAllowed
Path is a symbolic link (when not allowed)
InvalidPathFormat
Invalid path format
FileTooLarge
File too large
ForbiddenExtension
Forbidden file extension
Implementations§
Source§impl SecurityError
impl SecurityError
Sourcepub fn user_message(&self) -> String
pub fn user_message(&self) -> String
Get a user-friendly error message
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable
Trait Implementations§
Source§impl Clone for SecurityError
impl Clone for SecurityError
Source§fn clone(&self) -> SecurityError
fn clone(&self) -> SecurityError
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 SecurityError
impl Debug for SecurityError
Source§impl Display for SecurityError
impl Display for SecurityError
Source§impl Error for SecurityError
impl Error for SecurityError
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()
Auto Trait Implementations§
impl Freeze for SecurityError
impl RefUnwindSafe for SecurityError
impl Send for SecurityError
impl Sync for SecurityError
impl Unpin for SecurityError
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more