Class
ImageTask
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.
Relationships
Conforms To
CustomStringConvertible
Hashable
Properties
taskId
public let taskId: Int64
An identifier that uniquely identifies the task within a given pipeline. Unique only within that pipeline.
priority
public var priority: ImageRequest.Priority
Updates the priority of the task, even if it is already running.
completedUnitCount
public private(set) var completedUnitCount: Int64 = 0
The number of bytes that the task has received.
totalUnitCount
public private(set) var totalUnitCount: Int64 = 0
A best-guess upper bound on the number of bytes of the resource.
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)