LoadingState
public enum LoadingState<Error> where Error : Error
Represents the possible state of an Action
in Reactive Swift.
-
Represents the state of an action that has received any values, has completed successfully or was interrupted.
Declaration
Swift
case `default`
-
Represents the state of an action that is loading
Declaration
Swift
case loading
-
Represents the state of an action that has failed, with the
Error
it failed with.Declaration
Swift
case failed(error: Error)
-
If the current state is
.failed
, returns the associated error. If not, returnsnil
Declaration
Swift
public var error: Error? { get }
-
If the current state is
.loading
, returnstrue
. If not, returnsfalse
Declaration
Swift
public var isLoading: Bool { get }