Contents

URL.ParseStrategy.ComponentParseStrategy

The strategy used to parse one component of a URL.

Declaration

enum ComponentParseStrategy<Component> where Component : Decodable, Component : Encodable, Component : Hashable, Component : Sendable

Overview

Use this type with the URL.ParseStrategy initializer and static accessors, or its modifier methods, to specify behavior for parsing components of a URL. This allows you to reject URL candidate strings that lack required components — such as a scheme, host, or path — or to fill in default values while parsing.

Topics

Component parse strategies

See Also

Creating a URL parse strategy