this repo has no description
1//
2// URLQueryItemEncoder+OutputFormatting.swift
3// URLQueryItemCoder
4//
5// Created by Kyle Hughes on 4/11/23.
6//
7
8extension URLQueryItemEncoder {
9 /// The output formatting options that determine the element order of an encoded `URLQueryItem` array.
10 public struct OutputFormatting: OptionSet {
11 /// A raw value representing a set of output formatting options.
12 public let rawValue: Int
13
14 // MARK: Public Initialization
15
16 /// Creates a new set of output formatting options from the given raw value.
17 ///
18 /// - Parameter rawValue: A raw value representing a set of output formatting options.
19 /// - Returns: A new set of output formatting options from the given raw value.
20 public init(rawValue: Int) {
21 self.rawValue = rawValue
22 }
23 }
24}
25
26// MARK: - Constants
27
28extension URLQueryItemEncoder.OutputFormatting {
29 /// The default formatting options.
30 ///
31 /// Equals the empty set, `[]`.
32 public static let `default`: Self = []
33
34 /// The output formatting option that sorts keys in lexicographic order.
35 public static let sortedKeys = Self(rawValue: 1 << 0)
36}