pub trait PolicyId:
Copy
+ Clone
+ Debug
+ Eq
+ Hash
+ Ord
+ PartialOrd {
// Required methods
fn as_u32(&self) -> u32;
fn from_u32(value: u32) -> Option<Self>;
}Expand description
Trait for strongly-typed policy identifiers.
Types implementing PolicyId can be parsed from and serialized to u32 values
in the binary policy database, but are represented as strongly-typed integers
(often wrapping NonZeroU16 or NonZeroU32) in the logical domain model.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.