pub trait FactPayload:
Debug
+ Clone
+ Serialize
+ Send
+ Sync
+ 'static {
const FAMILY: &'static str;
const VERSION: u16;
// Provided method
fn validate(&self) -> Result<(), PayloadError> { ... }
}Expand description
Typed payload carried by proposed and promoted facts.
Implementors own a frozen (FAMILY, VERSION) tuple. A shape change is a new
Rust type and a new VERSION, never an implicit registry upgrade.
Required Associated Constants§
Provided Methods§
Sourcefn validate(&self) -> Result<(), PayloadError>
fn validate(&self) -> Result<(), PayloadError>
Validate domain invariants that the Rust type cannot make unrepresentable.
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.