Skip to main content

OptionExt

Trait OptionExt 

Source
pub trait OptionExt<T> {
    // Required method
    fn try_map<'tcx, U>(
        self,
        f: impl FnOnce(T) -> InterpResult<'tcx, U>,
    ) -> InterpResult<'tcx, Option<U>>;
}

Required Methods§

Source

fn try_map<'tcx, U>( self, f: impl FnOnce(T) -> InterpResult<'tcx, U>, ) -> InterpResult<'tcx, Option<U>>

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> OptionExt<T> for Option<T>

Source§

fn try_map<'tcx, U>( self, f: impl FnOnce(T) -> InterpResult<'tcx, U>, ) -> InterpResult<'tcx, Option<U>>

Implementors§