Trait InfallibleResultExt

Source
pub trait InfallibleResultExt<E> {
    // Required method
    fn extract_err(self) -> E;
}
Expand description

Extension trait for Results that are known to always be Err

Required Methods§

Source

fn extract_err(self) -> E

Extract the error value from a Result that is known to always be Err

This is a stable alternative to the nightly-only into_err() method. Use this when you have a Result<T, E> where T is an uninhabited type or when you know the Result will always be Err.

Implementors§