then()
maps Result<Item, Error>
to Result<Item, Error>
;
map()
maps Item
to Item
;
map_err()
maps Error
to Error
;
Is there a combinator:
- which maps
Item
toResult<Item, Error>
, - which would be invoked only when future chain was successful before (like
map()
) AND - which would trigger following chained
map()
calls, if the combinator returns Ok(Item) AND - which would trigger following chained
map_err()
calls, if the combinator returns Err(Error)
?
If there is none, how could I come up with one?