LDEvaluationDetail

public final class LDEvaluationDetail<T>

An object returned by the SDK’s variationDetail methods, combining the result of a flag evaluation with an explanation of how it is calculated.

  • The value of the flag for the current context.

    Declaration

    Swift

    public let value: T
  • The index of the returned value within the flag’s list of variations, or nil if the default was returned.

    Declaration

    Swift

    public let variationIndex: Int?
  • A structure representing the main factor that influenced the resultant flag evaluation value.

    Declaration

    Swift

    public let reason: [String : LDValue]?
  • Apply the transform function to the detail’s inner value property, converting an LDEvaluationDetail<T> to an LDEvaluationDetail<U>.

    Declaration

    Swift

    public func map<U>(transform: ((T) -> U)) -> LDEvaluationDetail<U>