Type Alias mhost::app::modules::PartialResult
source · pub type PartialResult<T> = Result<T, PartialError>;
Expand description
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 the Result::Err
side of the
execution.
Think of it as a means for early returns.
Aliased Type§
enum PartialResult<T> {
Ok(T),
Err(PartialError),
}