Inherits from NSObject
Declared in UAActionResult.h

Overview

A class that holds the results of running an action, with optional metadata.

Properties

error

An optional error value that can be set if the action was unable to perform its work successfully.

@property (nonatomic, strong, readonly, nullable) NSError *error

Declared In

UAActionResult.h

fetchResult

An optional UAActionFetchResult that can be set if the action performed a background fetch.

@property (nonatomic, assign, readonly) UAActionFetchResult fetchResult

Declared In

UAActionResult.h

status

The action’s run status.

@property (nonatomic, assign, readonly) UAActionStatus status

Declared In

UAActionResult.h

value

The result value produced when running an action (can be nil).

@property (nonatomic, strong, readonly, nullable) id value

Declared In

UAActionResult.h

Class Methods

emptyResult

Creates an “empty” UAActionResult with the value, fetch result and error set to nil, UAActionFetchResultNone, and nil, respectively.

+ (instancetype)emptyResult

Declared In

UAActionResult.h

resultWithError:

Creates a UAActionResult with the value and fetch result set to nil and UAActionFetchResultNone, respectively. The error property is set to the supplied argument.

+ (instancetype)resultWithError:(NSError *)error

Parameters

error

An instance of NSError.

Declared In

UAActionResult.h

resultWithError:withFetchResult:

Creates a UAActionResult with the value set to nil. The error and fetchResult properties are set to the supplied arguments.

+ (instancetype)resultWithError:(NSError *)error withFetchResult:(UAActionFetchResult)fetchResult

Parameters

error

An instance of NSError.

fetchResult

A UAActionFetchResult enum value.

Declared In

UAActionResult.h

resultWithValue:

Creates a UAActionResult with the supplied value. The fetchResult and error properties default to UAActionFetchResultNone and nil, respectively.

+ (instancetype)resultWithValue:(nullable id)value

Parameters

value

An id typed value object.

Return Value

An instance of UAActionResult.

Declared In

UAActionResult.h

resultWithValue:withFetchResult:

Creates a UAActionResult with the supplied value and fetch result. The error property defaults to nil.

+ (instancetype)resultWithValue:(nullable id)result withFetchResult:(UAActionFetchResult)fetchResult

Parameters

result

An id typed value object.

fetchResult

A UAActionFetchResult enum value.

Return Value

An instance of UAActionResult.

Declared In

UAActionResult.h