pub trait GlobalProperty: Any {
type Value: Any;
// Required methods
fn new() -> Self;
fn validate(value: &Self::Value) -> Result<(), Box<dyn Error + 'static>>;
// Provided method
fn name() -> &'static str { ... }
}Expand description
The trait representing a global property. Do not use this
directly, but instead define global properties with
define_global_property!.
Validation errors are produced by client code and should be returned as
Box<dyn std::error::Error + 'static>. Ixa wraps those values in
IxaError::IllegalGlobalPropertyValue
when a global property is set or loaded.
Required Associated Types§
Required Methods§
Provided 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.