UAActionResult Class Reference
Inherits from | NSObject |
Declared in | UAActionResult.h |
Tasks
-
value
property -
fetchResult
property -
error
property -
status
property -
+ resultWithValue:
-
+ resultWithValue:withFetchResult:
-
+ emptyResult
-
+ resultWithError:
-
+ resultWithError:withFetchResult:
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
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
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
Return Value
An instance of UAActionResult.
Declared In
UAActionResult.h