RSDCollectionResult
public protocol RSDCollectionResult : RSDResult, RSDAnswerResultFinder
RSDCollectionResult
is used include multiple results associated with a single step or async action that
may have more that one result.
-
The list of input results associated with this step. These are generally assumed to be answers to field inputs, but they are not required to implement the
RSDAnswerResult
protocol.Declaration
Swift
var inputResults: [RSDResult]
-
findResult(with:)
Extension methodFind a result within this collection.
Declaration
Swift
public func findResult(with identifier: String) -> RSDResult?
Parameters
identifier
The identifier associated with the result.
Return Value
The result or
nil
if not found. -
findAnswerResult(with:)
Extension methodFind an answer result within this collection. This method will return
nil
if there is a result but that result does not conform to to theRSDAnswerResult
protocol.Seealso
Declaration
Swift
public func findAnswerResult(with identifier:String ) -> RSDAnswerResult?
Parameters
identifier
The identifier associated with the result.
Return Value
The result or
nil
if not found. -
appendInputResults(with:)
Extension methodAppend the result to the end of the input results, replacing the previous instance with the same identifier.
Parameters
result
The result to add to the input results.
Return Value
The previous result or
nil
if there wasn’t one. -
removeInputResult(with:)
Extension methodAppend the result to the end of the input results, replacing the previous instance with the same identifier.
Declaration
Swift
mutating public func removeInputResult(with identified: String) -> RSDResult?
Parameters
result
The result to add to the input results.
Return Value
The previous result or
nil
if there wasn’t one.