Skip to main content

IntoPlanExecutionError

Trait IntoPlanExecutionError 

Source
pub trait IntoPlanExecutionError<T> {
    // Required method
    fn with_plan_context<SN, AP>(
        self,
        context: LazyPlanContext<SN, AP>,
    ) -> Result<T, PlanExecutionError>
       where SN: FnOnce() -> Option<String>,
             AP: FnOnce() -> Option<String>;
}
Expand description

An extension trait for Result types that can be converted into a PlanExecutionError.

This trait provides a lazy, performant way to add contextual information to an error, only performing work (like cloning strings) if the Result is an Err.

Required Methods§

Source

fn with_plan_context<SN, AP>( self, context: LazyPlanContext<SN, AP>, ) -> Result<T, PlanExecutionError>
where SN: FnOnce() -> Option<String>, AP: FnOnce() -> Option<String>,

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> IntoPlanExecutionError<T> for Result<T, SubgraphExecutorError>

Source§

fn with_plan_context<SN, AP>( self, context: LazyPlanContext<SN, AP>, ) -> Result<T, PlanExecutionError>
where SN: FnOnce() -> Option<String>, AP: FnOnce() -> Option<String>,

Source§

impl<T> IntoPlanExecutionError<T> for Result<T, HeaderRuleRuntimeError>

Source§

fn with_plan_context<SN, AP>( self, context: LazyPlanContext<SN, AP>, ) -> Result<T, PlanExecutionError>
where SN: FnOnce() -> Option<String>, AP: FnOnce() -> Option<String>,

Source§

impl<T> IntoPlanExecutionError<T> for Result<T, ProjectionError>

Source§

fn with_plan_context<SN, AP>( self, context: LazyPlanContext<SN, AP>, ) -> Result<T, PlanExecutionError>
where SN: FnOnce() -> Option<String>, AP: FnOnce() -> Option<String>,

Implementors§