Nuke Documentation

Class Image​Task

public final class ImageTask: Hashable, CustomStringConvertible  

A task performed by the ImagePipeline.

The pipeline maintains a strong reference to the task until the request finishes or fails; you do not need to maintain a reference to the task unless it is useful for your app.

ImageTask ImageTask ImageTaskSubscribers ImageTaskSubscribers ImageTask->ImageTaskSubscribers CustomStringConvertible CustomStringConvertible ImageTask->CustomStringConvertible Hashable Hashable ImageTask->Hashable

Conforms To

CustomStringConvertible
Hashable

Properties

task​Id

public let taskId: Int64

An identifier that uniquely identifies the task within a given pipeline. Unique only within that pipeline.

request

public let request: ImageRequest

The original request.

priority

public var priority: ImageRequest.Priority  

Updates the priority of the task, even if it is already running.

completed​Unit​Count

public private(set) var completedUnitCount: Int64 = 0

The number of bytes that the task has received.

total​Unit​Count

public private(set) var totalUnitCount: Int64 = 0

A best-guess upper bound on the number of bytes of the resource.

progress

public var progress: Progress  

Returns a progress object for the task, created lazily.

description

public var description: String  

Methods

cancel()

public func cancel()  

Marks task as being cancelled.

The pipeline will immediately cancel any work associated with a task unless there is an equivalent outstanding task running (see ImagePipeline.Configuration.isCoalescingEnabled for more info).

hash(into:​)

public func hash(into hasher: inout Hasher)  

Operators

==

public static func == (lhs: ImageTask, rhs: ImageTask) -> Bool