pub struct MitigationOperationError {
pub operation: Cow<'static, str>,
pub policy: Cow<'static, str>,
pub process_id: Option<u32>,
pub reason: Option<Cow<'static, str>>,
pub error_code: Option<i32>,
}Expand description
Mitigation operation error.
Fields§
§operation: Cow<'static, str>Operation that failed.
policy: Cow<'static, str>Policy name associated with the operation.
process_id: Option<u32>Optional process ID for process-specific operations.
reason: Option<Cow<'static, str>>Optional reason for failure.
error_code: Option<i32>Windows error code if available.
Implementations§
Source§impl MitigationOperationError
impl MitigationOperationError
Sourcepub fn new(
operation: impl Into<Cow<'static, str>>,
policy: impl Into<Cow<'static, str>>,
) -> Self
pub fn new( operation: impl Into<Cow<'static, str>>, policy: impl Into<Cow<'static, str>>, ) -> Self
Create a new mitigation operation error.
Sourcepub fn with_process_id(self, process_id: u32) -> Self
pub fn with_process_id(self, process_id: u32) -> Self
Attach a process ID context.
Sourcepub fn with_reason(self, reason: impl Into<Cow<'static, str>>) -> Self
pub fn with_reason(self, reason: impl Into<Cow<'static, str>>) -> Self
Attach a reason string.
Trait Implementations§
Source§impl Debug for MitigationOperationError
impl Debug for MitigationOperationError
Source§impl Display for MitigationOperationError
impl Display for MitigationOperationError
Source§impl Error for MitigationOperationError
impl Error for MitigationOperationError
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 MitigationOperationError
impl RefUnwindSafe for MitigationOperationError
impl Send for MitigationOperationError
impl Sync for MitigationOperationError
impl Unpin for MitigationOperationError
impl UnsafeUnpin for MitigationOperationError
impl UnwindSafe for MitigationOperationError
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