Type Definition mhost::app::modules::PartialResult [−][src]
type PartialResult<T> = Result<T, PartialError>;
Return type for App modules that go through multiple steps
- An App module might go through multiple distinct steps to eventually fulfill its task. Along this
- way, errors might occur. Errors should be reported using
Result
. But what if a step finishes - without errors but still couldn’t obtain the necessary information for the next step to proceed?
- For this use case,
PartialResult
works similar to an Either type for theResult::Err
side of the - execution.
- Think of it as a means for early returns.