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, returns nil

    Declaration

    Swift

    public var error: Error? { get }
  • Deprecated: Please use isLoading instead.

    Refer to the documentation for isLoading for more info.

    Declaration

    Swift

    @available(*, deprecated, renamed: "isLoading")
    public var loading: Bool { get }
  • If the current state is .loading, returns true. If not, returns false

    Declaration

    Swift

    public var isLoading: Bool { get }