SecurityState

Struct SecurityState 

Source
#[repr(align(64))]
pub struct SecurityState {
Show 14 fields pub total_violations: AtomicU64, pub stack_violations: AtomicU64, pub guard_violations: AtomicU64, pub cfi_violations: AtomicU64, pub isolation_violations: AtomicU64, pub memory_violations: AtomicU64, pub resource_violations: AtomicU64, pub crypto_violations: AtomicU64, pub canaries_enabled: AtomicBool, pub guards_enabled: AtomicBool, pub cfi_enabled: AtomicBool, pub isolation_enabled: AtomicBool, pub aslr_enabled: AtomicBool, pub audit_enabled: AtomicBool, /* private fields */
}
Expand description

Global security state and statistics.

Fields§

§total_violations: AtomicU64

Total security violations detected

§stack_violations: AtomicU64

Violations by type

§guard_violations: AtomicU64§cfi_violations: AtomicU64§isolation_violations: AtomicU64§memory_violations: AtomicU64§resource_violations: AtomicU64§crypto_violations: AtomicU64§canaries_enabled: AtomicBool

Security features enabled

§guards_enabled: AtomicBool§cfi_enabled: AtomicBool§isolation_enabled: AtomicBool§aslr_enabled: AtomicBool§audit_enabled: AtomicBool

Implementations§

Source§

impl SecurityState

Source

pub const fn new(config: SecurityConfig) -> Self

Source

pub fn record_violation( &self, violation: SecurityViolation, ) -> ViolationResponse

Record a security violation.

Source

pub fn get_stats(&self) -> SecurityStats

Get security statistics.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.