#[non_exhaustive]pub enum ProtectionError {
Unsupported(&'static str),
SyscallFailed {
op: &'static str,
code: i32,
},
DebuggerAttached(&'static str),
}Expand description
Process protection application failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unsupported(&'static str)
Platform or primitive unsupported — macOS mlockall absence is representative.
SyscallFailed
Syscall failure (errno + platform-specific detail go through the log path).
DebuggerAttached(&'static str)
Protection applied while a debugger / ptracer is already attached.
If disable_ptrace() only emits a silent warn, a caller could
misread .is_ok() as “no debugger”. This variant is the explicit
signal — operator should detach and retry, or fail-close at
startup (Tier-0 policy).
Trait Implementations§
Source§impl Debug for ProtectionError
impl Debug for ProtectionError
Source§impl Display for ProtectionError
impl Display for ProtectionError
Source§impl Error for ProtectionError
impl Error for ProtectionError
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 ProtectionError
impl RefUnwindSafe for ProtectionError
impl Send for ProtectionError
impl Sync for ProtectionError
impl Unpin for ProtectionError
impl UnsafeUnpin for ProtectionError
impl UnwindSafe for ProtectionError
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