Result
public enum Result<T>
The Result
contains the success or failure information for a completed transaction
-
Result<T>.success
indicates that the transaction succeeded, either because the save succeeded or because there were no changes to save. The associateduserInfo
is the value returned from the transaction closure.Declaration
Swift
case success(userInfo: T)
-
Result<T>.failure
indicates that the transaction either failed or was cancelled. The associated object for this value is aCoreStoreError
enum value.Declaration
Swift
case failure(error: CoreStoreError)
-
Returns
true
if the result indicates.success
,false
if the result is.failure
.Declaration
Swift
public var boolValue: Bool { get }