RenderedAsset

class RenderedAsset(val module: AssetModuleId, val type: AssetType, val variant: CompressionMode, val headers: Map<String, String>, val size: Long, val lastModified: Long, val digest: Pair<HashAlgorithm, ByteString>?, val producer: () -> ByteString)

Intermediary class which represents an asset that has been fully prepared to serve to an end-user request, including any headers which should apply to the response.

Parameters

module

Asset module which was rendered to produce this record.

type

Type of asset being served.

variant

Compression mode for this asset response.

headers

Headers to apply to this asset response.

size

Size of the data expected from this asset variant.

lastModified

Unix epoch timestamp indicating when this asset was last modified.

digest

Raw bytes of the attached digest for this asset.

producer

Data payload callable for this asset response.

Constructors

Link copied to clipboard
constructor(module: AssetModuleId, type: AssetType, variant: CompressionMode, headers: Map<String, String>, size: Long, lastModified: Long, digest: Pair<HashAlgorithm, ByteString>?, producer: () -> ByteString)

Properties

Link copied to clipboard
val digest: Pair<HashAlgorithm, ByteString>?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val producer: () -> ByteString
Link copied to clipboard
val size: Long
Link copied to clipboard
Link copied to clipboard
val variant: CompressionMode