Trait IntoResult

Source
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 where T: IntoValue + TypedValue - Direct value conversion
  • Result<T, E> where T: IntoValue + TypedValue, E: IntoError - Error handling

Required Methods§

Source

fn into_result(self) -> Result<Value, Error>

Convert the value into a CEL result.

Source

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.

Implementations on Foreign Types§

Source§

impl<T: IntoValue + TypedValue, E: IntoError> IntoResult for Result<T, E>

Implementors§