pub enum SecurityLevel {
Public,
Internal,
Medium,
Confidential,
Secret,
TopSecret,
}Expand description
Hierarchical security classification levels for data and operations.
Security levels provide a standardized way to classify the sensitivity of data and determine appropriate protection measures. Higher levels require stronger security controls and more restrictive access policies.
§Security Level Hierarchy
Levels are ordered from lowest to highest sensitivity:
§Public
- Sensitivity: None
- Access: Unrestricted public access
- Protection: Minimal security controls
- Use Cases: Public documentation, marketing materials
§Internal
- Sensitivity: Low
- Access: Internal organization members
- Protection: Basic access controls
- Use Cases: Internal communications, general business data
§Medium
- Sensitivity: Moderate
- Access: Authorized personnel only
- Protection: Standard security measures
- Use Cases: Business plans, financial reports
§Confidential
- Sensitivity: High
- Access: Need-to-know basis
- Protection: Strong encryption and access controls
- Use Cases: Customer data, proprietary information
§Secret
- Sensitivity: Very High
- Access: Strictly controlled
- Protection: Advanced security measures
- Use Cases: Trade secrets, sensitive personal data
§TopSecret
- Sensitivity: Maximum
- Access: Highest clearance only
- Protection: Maximum security controls
- Use Cases: Critical infrastructure, national security data
§Level Comparison
Security levels support comparison operations for policy enforcement:
§Usage Examples
Variants§
Trait Implementations§
Source§impl Clone for SecurityLevel
impl Clone for SecurityLevel
Source§fn clone(&self) -> SecurityLevel
fn clone(&self) -> SecurityLevel
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 SecurityLevel
impl Debug for SecurityLevel
Source§impl<'de> Deserialize<'de> for SecurityLevel
impl<'de> Deserialize<'de> for SecurityLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SecurityLevel
impl Display for SecurityLevel
Source§impl Ord for SecurityLevel
impl Ord for SecurityLevel
Source§fn cmp(&self, other: &SecurityLevel) -> Ordering
fn cmp(&self, other: &SecurityLevel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SecurityLevel
impl PartialEq for SecurityLevel
Source§impl PartialOrd for SecurityLevel
impl PartialOrd for SecurityLevel
Source§impl Serialize for SecurityLevel
impl Serialize for SecurityLevel
impl Eq for SecurityLevel
impl StructuralPartialEq for SecurityLevel
Auto Trait Implementations§
impl Freeze for SecurityLevel
impl RefUnwindSafe for SecurityLevel
impl Send for SecurityLevel
impl Sync for SecurityLevel
impl Unpin for SecurityLevel
impl UnwindSafe for SecurityLevel
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> 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