Skip to content

Structure

Parameters

Holds dynamic path components that were discovered while routing.
struct Parameters

Overview

After this struct has been filled with parameter values, you can fetch them out by name using get(_:) or get(_:as:).

let postID = parameters.get("post_id")

Topics

Initializers

Instance Properties

  • allNames
    Return a list of all parameter names which were captured. Does not include values listed in the catchall.
  • logger
    The configured logger.

Instance Methods

  • get(_:)
    Grabs the named parameter from the parameter bag.
  • get(_:as:)
    Grabs the named parameter from the parameter bag, casting it to a LosslessStringConvertible type.
  • getCatchall()
    Fetches the components matched by catchall (**).
  • set(_:to:)
    Adds a new parameter value to the bag.
  • setCatchall(matched:)
    Stores the components matched by catchall (**).

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype