Enumerations
The following enumerations are available globally.
-
Represents the possible state of an
See moreAction
in Reactive Swift.Declaration
Swift
public enum LoadingState<Error> where Error : Error
-
Represents a transfer state, either loading or finished. This is useful to represent a transfer state in percentage or bytes uploaded for example.
It is recommended to define a
typealias
corresponding to your use case that specify at least theProgress
type, for example:typealias DownloadState<Value> = TransferState<Double, Value>
or
typealias DownloadState<Value> = TransferState<(uploadedBytes: UInt64, totalBytes: UInt64)?, Value>
Nothing prevents you to also include the
See moreValue
type in thetypealias
, if possible for your use case.Declaration
Swift
public enum TransferState<Progress, Value>