Skip to main content

OrRefuse

Trait OrRefuse 

Source
pub trait OrRefuse<T> {
    // Required methods
    fn or_refuse(
        self,
        stage: KernelStage,
        what: &'static str,
    ) -> Result<T, KernelRefusal>;
    fn or_input(
        self,
        stage: KernelStage,
        what: &'static str,
    ) -> Result<T, KernelRefusal>;
}
Expand description

Mechanical conversion of a stringly LOWER-layer error consumed inside a typed stack (geometry evaluation, tolerance policy checks): the text is kept and the refusal is classed Internal under what at stage. This is a constructor at the consuming site, not a blanket From.

Required Methods§

Source

fn or_refuse( self, stage: KernelStage, what: &'static str, ) -> Result<T, KernelRefusal>

Source

fn or_input( self, stage: KernelStage, what: &'static str, ) -> Result<T, KernelRefusal>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> OrRefuse<T> for Result<T, String>

Source§

fn or_refuse( self, stage: KernelStage, what: &'static str, ) -> Result<T, KernelRefusal>

Source§

fn or_input( self, stage: KernelStage, what: &'static str, ) -> Result<T, KernelRefusal>

Implementors§