mod sealed {
pub trait Sealed {}
}
pub trait StateProtection: sealed::Sealed + Send + Sync + 'static {
#[doc(hidden)]
const ID: u64;
}
#[derive(Clone, Copy, Debug, Default)]
pub struct Blake3State;
#[derive(Clone, Copy, Debug, Default)]
pub struct EncryptedState;
impl sealed::Sealed for Blake3State {}
impl sealed::Sealed for EncryptedState {}
impl StateProtection for Blake3State {
const ID: u64 = 1;
}
impl StateProtection for EncryptedState {
const ID: u64 = 2;
}
#[derive(Clone, Copy, Debug, Default)]
pub struct UnprotectedState;
impl sealed::Sealed for UnprotectedState {}
impl StateProtection for UnprotectedState {
const ID: u64 = 3;
}