pub trait ValueRepr: Sealed {
type Value: 'static;
// Required method
fn value_type() -> ValueType;
}Expand description
Names a trusted concrete representation without wrapping its runtime value.
Only this crate implements the trait; use Leaf for any foreign host type.
§Examples
use cel_runtime::value_type::{ArrayOf, Leaf, ValueRepr};
use cel_runtime::Array;
let _: <ArrayOf<Leaf<i32>> as ValueRepr>::Value = Array::from_vec(vec![1]);Required Associated Types§
Required Methods§
Sourcefn value_type() -> ValueType
fn value_type() -> ValueType
Returns the complete identity, layout, and ownership plan.
Leaves have no optional capabilities by default.
- Complexity: O(n) time and space for n nodes in the descriptor tree.
§Examples
use cel_runtime::value_type::{Leaf, ValueRepr, ValueType};
assert!(Leaf::<i32>::value_type().same_shape(&ValueType::leaf::<i32>()));Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".