Skip to main content

ResultExt

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".

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§