Structurevapor 4.114.1Vapor
HTTPMediaTypeSet
A collection for efficiently determining if a set of types contains another type.
struct HTTPMediaTypeSet
A collection for efficiently determining if a set of types contains another type.
struct HTTPMediaTypeSet
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.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Escapable
protocol ExpressibleByArrayLiteral
A type that can be initialized using an array literal.
protocol Sendable
init(arrayLiteral elements: HTTPMediaType...)
init(mediaTypes: some Sequence<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.