pub trait ToConstValue: Sized {
// Required method
fn to_const_value(self) -> Result<ConstValue, RuntimeError>;
// Provided method
fn construct() -> Option<Arc<dyn ConstConstruct>> { ... }
}Expand description
Convert a value into a constant value.
Required Methods§
Sourcefn to_const_value(self) -> Result<ConstValue, RuntimeError>
fn to_const_value(self) -> Result<ConstValue, RuntimeError>
Convert into a constant value.
Provided Methods§
Sourcefn construct() -> Option<Arc<dyn ConstConstruct>>
fn construct() -> Option<Arc<dyn ConstConstruct>>
Return the constant constructor for the given type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".