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
init()Create a newParameters.init(Logger?)Create a newParameters.
Instance Properties
var allNames: Set<String>Return a list of all parameter names which were captured. Does not include values listed in the catchall.let logger: LoggerThe configured logger.
Instance Methods
func get(String) -> String?Grabs the named parameter from the parameter bag.func get<T>(String, as: T.Type) -> T?Grabs the named parameter from the parameter bag, casting it to aLosslessStringConvertibletype.func getCatchall() -> [String]Fetches the components matched bycatchall(**).func set(String, to: String?)Adds a new parameter value to the bag.func setCatchall(matched: [String])Stores the components matched bycatchall(**).
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype