ResponsePath


STRUCT

ResponsePath

Swift
1public struct ResponsePath: ExpressibleByArrayLiteral

Represents a list of string components joined into a path using a reverse linked list.

A response path is stored as a linked list because using an array turned out to be a performance bottleneck during decoding/execution.

In order to optimize for calculation of a path string, ResponsePath does not allow insertion of components in the middle or at the beginning of the path. Components may only be appended to the end of an existing path.

Properties

joined

Swift
1public var joined: String

isEmpty

Swift
1public var isEmpty: Bool

Methods

toArray()

Swift
1public func toArray() -> [String]

init(arrayLiteral:)

Swift
1public init(arrayLiteral segments: Key...)

init(_:)

Swift
1public init(_ key: Key)

append(_:)

Swift
1public mutating func append(_ key: Key)

appending(_:)

Swift
1public func appending(_ key: Key) -> ResponsePath

+(_:_:)

Swift
1public static func + (lhs: ResponsePath, rhs: Key) -> ResponsePath

+(_:_:)

Swift
1public static func + (lhs: ResponsePath, rhs: ResponsePath) -> ResponsePath

+(_:_:)

Swift
1public static func + <T: Sequence>(
2  lhs: ResponsePath, rhs: T
3) -> ResponsePath where T.Element == Key
Feedback

Edit on GitHub

Forums