RSDAnswerResultObject
public struct RSDAnswerResultObject : RSDAnswerResult, Codable
RSDAnswerResultObject
is a concrete implementation of a result that can be described using a single value.
-
The identifier associated with the task, step, or asynchronous action.
Declaration
Swift
public let identifier: String
-
A String that indicates the type of the result. This is used to decode the result using a
RSDFactory
.Declaration
Swift
public let type: RSDResultType
-
The start date timestamp for the result.
Declaration
Swift
public var startDate: Date
-
The end date timestamp for the result.
Declaration
Swift
public var endDate: Date
-
The answer type of the answer result. This includes coding information required to encode and decode the value. The value is expected to conform to one of the coding types supported by the answer type.
Declaration
Swift
public let answerType: RSDAnswerResultType
-
The answer for the result.
Declaration
Swift
public var value: Any?
-
The question text for the form step (if applicable).
Declaration
Swift
public var questionText: String?
-
Default initializer for this object.
Declaration
Swift
public init(identifier: String, answerType: RSDAnswerResultType, value: Any? = nil)
Parameters
identifier
The identifier string.
answerType
The answer type of the answer result.
-
Initialize from a
Decoder
.Throws
DecodingError
Declaration
Swift
public init(from decoder: Decoder) throws
Parameters
decoder
The decoder to use to decode this instance.
-
Encode the result to the given encoder.
Throws
EncodingError
Declaration
Swift
public func encode(to encoder: Encoder) throws
Parameters
encoder
The encoder to use to encode this instance.