Nuke Documentation

Protocol Image​Decoder​Registering

public protocol ImageDecoderRegistering: ImageDecoding  

An image decoder which supports automatically registering in the decoder register.

ImageDecoderRegistering ImageDecoderRegistering ImageDecoding ImageDecoding ImageDecoderRegistering->ImageDecoding ImageDecoders.Default ImageDecoders.Default ImageDecoders.Default->ImageDecoderRegistering

Conforms To

ImageDecoding

An image decoder.

Types Conforming to Image​Decoder​Registering

ImageDecoders.Default

A decoder that supports all of the formats natively supported by the system.

Default Implementations

init?(partially​Downloaded​Data:​context:​)

init?(partiallyDownloadedData data: Data, context: ImageDecodingContext)  

The default implementation which simply returns nil (no progressive decoding available).

Requirements

init?(data:​context:​)

init?(data: Data, context: ImageDecodingContext) 

Returns non-nil if the decoder can be used to decode the given data.

Parameters

data Data

The same data is going to be delivered to decoder via decode(_:) method. The same instance of the decoder is going to be used.

init?(partially​Downloaded​Data:​context:​)

init?(partiallyDownloadedData data: Data, context: ImageDecodingContext) 

Returns non-nil if the decoder can be used to progressively decode the given partially downloaded data.

Parameters

data Data

The first and the next data chunks are going to be delivered to the decoder via decodePartiallyDownloadedData(_:) method.