DataStoreResult
extension DataStoreResult
extension DataStoreResult where Success: Any
-
Creates a
DataStoreResult
based on a error raised duringDataStore
operations. In case the error is not already aDataStoreError
, it gets wrapped with.invalidOperation
.Declaration
Swift
public static func failure(causedBy error: Error) -> DataStoreResult<Success>
Parameters
error
the root cause of the failure
Return Value
a
DataStoreResult.error
-
Declaration
Swift
public static var emptyResult: DataStoreResult<Void> { get }
-
Declaration
Swift
public func resolve(promise: Future<Success, DataStoreError>.Promise)