pub unsafe trait Invariant:
Debug
+ Default
+ Hash
+ Eq
+ Ord
+ Send
+ Sync
+ 'static {
type Error: Error;
type Terminate: Terminate;
// Required method
fn validate(key: &[u8]) -> Result<(), Self::Error>;
}Expand description
An invariant of [u8] that is sufficient to guarantee the
prefix property (no key is a prefix of another key).
§Safety
Caller must ensure that if validate returns Ok(()),
then key satisfies the prefix property.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".