pub trait IntoError {
// Required method
fn into_error(self) -> Error;
}
Expand description
Trait for converting values into CEL errors.
This trait provides a standardized way to convert different error types
into CEL Error
instances. It is automatically implemented for all
types that implement the standard library’s Error
trait.
§Examples
use cel_cxx::{Error, IntoError};
use std::io;
let io_error = io::Error::new(io::ErrorKind::NotFound, "File not found");
let cel_error = io_error.into_error();
§Automatic Implementation
This trait is automatically implemented for any type that implements
std::error::Error + Send + Sync + 'static
, so you typically don’t
need to implement it manually.