DataStoreResult

extension DataStoreResult
extension DataStoreResult where Success: Any
  • Creates a DataStoreResult based on a error raised during DataStore operations. In case the error is not already a DataStoreError, 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 }

Available where Success: Any