URLComponentsConvertible
public protocol URLComponentsConvertible
Types adopting the URLComponentsConvertible
protocol can be used to construct URLComponents
s, which can then be used to route.
-
如果构造成功则返回一个
URLComponents
,否则抛出异常.Throws
一个RouteError.badURL(url:)
实例.Declaration
Swift
func asURLComponents() throws -> URLComponents
Return Value
构造成功的
URLComponents