Initializervapor 4.114.1Vapor
init(mediaTypes:)
HTTPMediaType.swift:176init(mediaTypes: some Sequence<HTTPMediaType>)
init(mediaTypes: some Sequence<HTTPMediaType>)
s5Vapor16HTTPMediaTypeSetV10mediaTypesACx_tcSTRzAA0bC0V7ElementRtzlufc
What are these?93IFP
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct HTTPMediaTypeSet
A collection for efficiently determining if a set of types contains another type.
protocol Sequence<Element>
A type that provides sequential, iterated access to its elements.
struct HTTPMediaType
Represents an encoded data-format, used in HTTP, HTML, email, and elsewhere.
init(arrayLiteral elements: HTTPMediaType...)
static let all: HTTPMediaTypeSet
The super set of all HTTPMediaType
s.
static let compressible: HTTPMediaTypeSet
A list of known compressible MIME types.
static let incompressible: HTTPMediaTypeSet
A list of known incompressible MIME types.
static let none: HTTPMediaTypeSet
The empty set of HTTPMediaType
s.
func contains(_ mediaType: HTTPMediaType) -> Bool
Check to see if a media type is contained within the set.