RSDTaskResult

public protocol RSDTaskResult : RSDAnswerResultFinder, RSDResult

RSDTaskResult is a result associated with a task. This object includes a step history, task run UUID, schema identifier, and asynchronous results.

  • A unique identifier for this task run.

    Declaration

    Swift

    var taskRunUUID: UUID { get }
  • Schema info associated with this task.

    Declaration

    Swift

    var schemaInfo: RSDSchemaInfo? { get set }
  • A listing of the step history for this task or section. The listed step results should only include the last result for any given step.

    Declaration

    Swift

    var stepHistory: [RSDResult] { get set }
  • A list of all the asynchronous results for this task. The list should include uniquely identified results. The step history is used to describe the path you took to get to where you are going, whereas the asynchronous results include any canonical results that are independent of path.

    Declaration

    Swift

    var asyncResults: [RSDResult]? { get set }
  • findResult(for:) Extension method

    Find a result within the step history.

    Declaration

    Swift

    public func findResult(for step: RSDStep) -> RSDResult?

    Parameters

    step

    The step associated with the result.

    Return Value

    The result or nil if not found.

  • findResult(with:) Extension method

    Find a result within the step history.

    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 method

    Find an answer result within this collection. This method will return nil if there is a result but that result does not conform to to the RSDAnswerResult protocol.

    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.

  • appendStepHistory(with:) Extension method

    Append the result to the end of the step history, replacing the previous instance with the same identifier.

    Declaration

    Swift

    @discardableResult
    mutating public func appendStepHistory(with result: RSDResult) -> RSDResult?

    Parameters

    result

    The result to add to the step history.

    Return Value

    The previous result or nil if there wasn’t one.

  • removeStepHistory(from:) Extension method

    Remove results from the step history from the result with the given identifier to the end of the array.

    Declaration

    Swift

    @discardableResult
    mutating public func removeStepHistory(from stepIdentifier: String) -> Array<RSDResult>?

    Parameters

    stepIdentifier

    The identifier of the result associated with the given step.

    Return Value

    The previous result or nil if there wasn’t one.

  • appendAsyncResult(with:) Extension method

    Append the async results with the given result, replacing the previous instance with the same identifier. The step history is used to describe the path you took to get to where you are going, whereas the asynchronous results include any canonical results that are independent of path.

    Declaration

    Swift

    mutating public func appendAsyncResult(with result: RSDResult)

    Parameters

    result

    The result to add to the async results.