HBParameters

public struct HBParameters
extension HBParameters: Collection

Store for parameters key, value pairs extracted from URI

  • Return parameter with specified id

    Declaration

    Swift

    public func get(_ s: String) -> String?

    Parameters

    s

    parameter id

  • Return parameter with specified id as a certain type

    Declaration

    Swift

    public func get<T>(_ s: String, as: T.Type) -> T? where T : LosslessStringConvertible

    Parameters

    s

    parameter id

    as

    type we want returned

  • Return parameter with specified id

    Declaration

    Swift

    public func require(_ s: String) throws -> String

    Parameters

    s

    parameter id

  • Return parameter with specified id as a certain type

    Declaration

    Swift

    public func require<T>(_ s: String, as: T.Type) throws -> T where T : LosslessStringConvertible

    Parameters

    s

    parameter id

    as

    type we want returned

  • Undocumented

    Declaration

    Swift

    public subscript(s: String) -> String? { get }
  • Undocumented

    Declaration

    Swift

    public subscript(s: Substring) -> String? { get }
  • Initialize parameters from parser struct

    Declaration

    Swift

    init(fromQuery query: HBParser?)

    Parameters

    query

    parser holding query strings

  • Declaration

    Swift

    public typealias Index = Dictionary<Substring, Substring>.Index
  • Declaration

    Swift

    public var startIndex: Index { get }
  • Declaration

    Swift

    public var endIndex: Index { get }
  • Declaration

    Swift

    public subscript(index: Index) -> Dictionary<Substring, Substring>.Element { get }
  • Declaration

    Swift

    public func index(after index: Index) -> Index