A simple protocol package that does nothing.
The HasResult
protocol has a simple result
property and a ResultType
associated type.
This is mostly useful for Operation
(the operation has a result type which can be retrieved when the operation is done).
This whole library fits in these lines:
public protocol HasResult {
associatedtype ResultType
var result: Result<ResultType, Error> {get}
}
This protocol is easy to create in one’s project, but it can be useful to share and reuse a common protocol.