C++ Client-Side SDK
LaunchDarkly SDK
Typedefs | Enumerations | Functions
evaluation_detail.h File Reference
#include <launchdarkly/bindings/c/export.h>
#include <stddef.h>
Include dependency graph for evaluation_detail.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _LDEvalDetail * LDEvalDetail
 
typedef struct _LDEvalReason * LDEvalReason
 

Enumerations

enum  LDEvalReason_Kind {
  LD_EVALREASON_OFF = 0 , LD_EVALREASON_FALLTHROUGH = 1 , LD_EVALREASON_TARGET_MATCH = 2 , LD_EVALREASON_RULE_MATCH = 3 ,
  LD_EVALREASON_PREREQUISITE_FAILED = 4 , LD_EVALREASON_ERROR = 5
}
 
enum  LDEvalReason_ErrorKind {
  LD_EVALREASON_ERROR_CLIENT_NOT_READY = 0 , LD_EVALREASON_ERROR_USER_NOT_SPECIFIED = 1 , LD_EVALREASON_ERROR_FLAG_NOT_FOUND = 2 , LD_EVALREASON_ERROR_WRONG_TYPE = 3 ,
  LD_EVALREASON_ERROR_MALFORMED_FLAG = 4 , LD_EVALREASON_ERROR_EXCEPTION = 5
}
 

Functions

 LDEvalDetail_Free (LDEvalDetail detail)
 
 LDEvalDetail_VariationIndex (LDEvalDetail detail, size_t *out_variation_index)
 
 LDEvalDetail_Reason (LDEvalDetail detail, LDEvalReason *out_reason)
 
 LDEvalReason_Kind (LDEvalReason reason)
 
 LDEvalReason_ErrorKind (LDEvalReason reason, enum LDEvalReason_ErrorKind *out_error_kind)
 
 LDEvalReason_InExperiment (LDEvalReason reason)
 

Function Documentation

◆ LDEvalDetail_Free()

LDEvalDetail_Free ( LDEvalDetail  detail)

Frees the detail structure optionally returned by *VariationDetail functions.

Parameters
detailEvaluation detail to free.

◆ LDEvalDetail_Reason()

LDEvalDetail_Reason ( LDEvalDetail  detail,
LDEvalReason *  out_reason 
)

Returns the reason of the evaluation result, if any.

Parameters
detailEvaluation detail.Must not be NULL.
out_reasonPointer where reason should be stored, if any. The reason's lifetime is valid only for that of the containing EvalDetail. Must not be NULL.
Returns
True if a reason was present, false otherwise.

◆ LDEvalDetail_VariationIndex()

LDEvalDetail_VariationIndex ( LDEvalDetail  detail,
size_t *  out_variation_index 
)

Returns variation index of the evaluation result, if any.

Parameters
detailEvaluation detail. Must not be NULL.
out_variation_indexPointer where index should be stored, if any.
Returns
True if an index was present, false otherwise.

◆ LDEvalReason_ErrorKind()

LDEvalReason_ErrorKind ( LDEvalReason  reason,
enum LDEvalReason_ErrorKind *  out_error_kind 
)

Returns the evaluation reason's error kind, if the evaluation reason's kind was LD_EVALREASON_ERROR.

Parameters
reasonEvaluation reason. Must not be NULL.
out_error_kindPointer where error kind should be stored, if any. Must not be NULL.
Returns
True if an error kind was present, false otherwise.

◆ LDEvalReason_InExperiment()

LDEvalReason_InExperiment ( LDEvalReason  reason)

Whether the evaluation was part of an experiment.

Parameters
reasonEvaluation reason. Must not be NULL.
Returns
True if the evaluation resulted in an experiment rollout and served one of the variations in the experiment.

◆ LDEvalReason_Kind()

LDEvalReason_Kind ( LDEvalReason  reason)

Returns the evaluation reason's kind.

Parameters
reasonEvaluation reason. Must not be NULL.
Returns
Kind of reason.