RetryContext

public class RetryContext

Represents a retry context which could be used to determine the current retry status.

  • The source from which the target image should be retrieved.

    Declaration

    Swift

    public let source: Source
  • The last error which caused current retry behavior.

    Declaration

    Swift

    public let error: KingfisherError
  • The retried count before current retry happens. This value is 0 if the current retry is for the first time.

    Declaration

    Swift

    public var retriedCount: Int
  • A user set value for passing any other information during the retry. If you choose to use RetryDecision.retry as the retry decision for RetryStrategy.retry(context:retryHandler:), the associated value of RetryDecision.retry will be delivered to you in the next retry.

    Declaration

    Swift

    public internal(set) var userInfo: Any? { get }