flux_common::result

Trait ResultExt

Source
pub trait ResultExt<T, E> {
    // Required methods
    fn into_control_flow(self) -> ControlFlow<E, T>;
    fn collect_err(self, collector: &mut impl ErrorCollector<E>) -> Option<T>;
    fn emit<'a>(
        self,
        emitter: &'a impl ErrorEmitter,
    ) -> Result<T, ErrorGuaranteed>
       where E: Diagnostic<'a>;
}

Required Methods§

Source

fn into_control_flow(self) -> ControlFlow<E, T>

Source

fn collect_err(self, collector: &mut impl ErrorCollector<E>) -> Option<T>

Source

fn emit<'a>(self, emitter: &'a impl ErrorEmitter) -> Result<T, ErrorGuaranteed>
where E: Diagnostic<'a>,

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, E> ResultExt<T, E> for Result<T, E>

Source§

fn into_control_flow(self) -> ControlFlow<E, T>

Source§

fn collect_err(self, collector: &mut impl ErrorCollector<E>) -> Option<T>

Source§

fn emit<'a>(self, emitter: &'a impl ErrorEmitter) -> Result<T, ErrorGuaranteed>
where E: Diagnostic<'a>,

Implementors§