public protocol RouteParametersEncodable

The protocol for encoding an input value from URL route parameters. Conform your input types to this to to enable creation of links to actions with your input type.

  • Return a dictionary of URL parameters that, when passed to RouteParametersDecodable.init, will reconstruct the same state of the conforming type. Implementations can use the mapping parameter to perform different encoding based on the kind of URL e.g. app custom URL scheme or deep linking.

    • param mapping: The URL mapping that is being used to create a link



    func encodeAsRouteParameters(for mapping: URLMapping) -> RouteParameters?