#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
#[non_exhaustive]
pub enum BackendClass {
Scalar,
Accelerated,
Checked,
}
impl BackendClass {
#[must_use]
pub const fn as_str(self) -> &'static str {
match self {
Self::Scalar => "scalar",
Self::Accelerated => "accelerated",
Self::Checked => "checked",
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
#[non_exhaustive]
pub enum AssuranceClass {
Ordinary,
CheckedBackend,
Secret,
HighAssurance,
}
impl AssuranceClass {
#[must_use]
pub const fn as_str(self) -> &'static str {
match self {
Self::Ordinary => "ordinary",
Self::CheckedBackend => "checked-backend",
Self::Secret => "secret",
Self::HighAssurance => "high-assurance",
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
#[non_exhaustive]
pub enum ProtocolScope {
Core,
Compatibility,
Companion,
}
impl ProtocolScope {
#[must_use]
pub const fn as_str(self) -> &'static str {
match self {
Self::Core => "core",
Self::Compatibility => "compatibility",
Self::Companion => "companion",
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
#[non_exhaustive]
pub enum Atomicity {
Unchanged,
Rollback,
CommittedPrefix,
IrrevocableSink,
}
impl Atomicity {
#[must_use]
pub const fn as_str(self) -> &'static str {
match self {
Self::Unchanged => "unchanged",
Self::Rollback => "rollback",
Self::CommittedPrefix => "committed-prefix",
Self::IrrevocableSink => "irrevocable-sink",
}
}
}