outcome
outcome
Type Parameters
Functions
(env_vars option (container.Map String String), feed_stdin option io.path, timeout option time.duration) => outcome tokiwa.process_result[Inherited from Sequence]¶
(env_vars option (container.Map String String), feed_stdin option io.path, timeout option time.duration)
=>
outcome tokiwa.process_result[Inherited from Sequence]
¶execute this Sequence of process+args
0.099dev (GIT hash 9b94ad4b4a4bff2bf2be7d77be2c6e1fd7683c4d)
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.