pub enum ErrorSensitivityLabel<T> {
Public(T),
Private(T),
PrivateConfidential(T),
Internal(T),
Confidential(T),
HighlyConfidential(T),
}Expand description
Controls the visibility and handling of data based on its sensitivity.
Each variant wraps a value of type T and determines who can see that data
and whether it should be encrypted.
Data Owner: Data that should only be shared with the user, not other users.
Data Can be shared with:
| Level | Data Owner | Other Users | Internal | Encrypted |
|---|---|---|---|---|
| Public | yes | yes | yes | no |
| Private | yes | no | yes | no |
| PrivateConfidential | yes | no | no | yes (user key) |
| –––––––––– | :–––––: | :———–: | :––––: | :––––––––: |
| Internal | no | no | yes | no |
| Confidential | no | no | yes | yes (app key) |
| HighlyConfidential | no | no | yes | yes (specific) |
Variants§
Public(T)
Data that can be shared with any user, no restrictions.
Private(T)
Data that should only be shared with the user who owns the data, no other users. The data can be shared using Internal channels.
PrivateConfidential(T)
Data that should only be shared with the user, no other users. The data can NOT be shared using Internal channels. TODO: Data should be Encrypted using users public key.
Internal(T)
Data that should only be shared Internally within the organization. TODO: Data is should never be shared outside of organization.
Confidential(T)
Data is considered sensitive and access is limited. TODO: Data should be Encrypted using application public key.
HighlyConfidential(T)
Data is Very sensitive, and should not be stored unless encrypted. TODO: Data is/should always be Encrypted using highly specific keys. Data is only available in specific circumstances:
- Only in Debug Builds
- Never Stored in JSON
- Printed as encrypted string
Trait Implementations§
Source§impl<T: Clone> Clone for ErrorSensitivityLabel<T>
impl<T: Clone> Clone for ErrorSensitivityLabel<T>
Source§fn clone(&self) -> ErrorSensitivityLabel<T>
fn clone(&self) -> ErrorSensitivityLabel<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more