pub trait IntoResult: Sealed {
// Required methods
fn into_result(self) -> Result<Value, Error>;
fn value_type() -> ValueType;
}
Expand description
Trait for converting return values to CEL results.
This trait provides automatic conversion for function return types,
supporting both direct values and Result
types for error handling.
§Note
This trait is sealed and cannot be implemented outside this crate.
§Implementations
T
whereT: IntoValue + TypedValue
- Direct value conversionResult<T, E>
whereT: IntoValue + TypedValue, E: IntoError
- Error handling
Required Methods§
Sourcefn into_result(self) -> Result<Value, Error>
fn into_result(self) -> Result<Value, Error>
Convert the value into a CEL result.
Sourcefn value_type() -> ValueType
fn value_type() -> ValueType
Get the CEL type of the resulting value.
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.