[][src]Trait cex::MapOkey

pub trait MapOkey<Src, E> where
    Self: Into<Result<Src, E>>, 
{ fn map_okey<Dest, Indices>(self) -> Result<Dest, E>
    where
        Src: Sized + IntoEnumx<Dest, Indices>
, { ... } }

Enum exchange for Ok combinator.

use cex::*;
use enumx::Enum;

let ok: Result<i32,()> = Ok( 42 );
let ok: Result<Enum!(i32,bool),()> = ok.map_okey();
assert_eq!( ok, Ok( Enum2::_0(42) ));

Provided methods

fn map_okey<Dest, Indices>(self) -> Result<Dest, E> where
    Src: Sized + IntoEnumx<Dest, Indices>, 

Loading content...

Implementors

impl<Res, T, Src> MapOkey<T, Src> for Res where
    Res: Into<Result<T, Src>>, 
[src]

fn map_okey<Dest, Indices>(self) -> Result<Dest, E> where
    Src: Sized + IntoEnumx<Dest, Indices>, 
[src]

Loading content...