pub struct ResolutionDetails<T> {
pub value: T,
pub variant: Option<String>,
pub reason: Option<EvaluationReason>,
pub flag_metadata: Option<FlagMetadata>,
}
Expand description
A structure which contains a subset of the fields defined in the evaluation details, representing the result of the provider’s flag resolution process.
Fields§
§value: T
In cases of normal execution, the provider MUST populate the resolution details structure’s value field with the resolved flag value.
variant: Option<String>
In cases of normal execution, the provider SHOULD populate the resolution details structure’s variant field with a string identifier corresponding to the returned flag value.
reason: Option<EvaluationReason>
The provider SHOULD populate the resolution details structure’s reason field with “STATIC”, “DEFAULT”, “TARGETING_MATCH”, “SPLIT”, “CACHED”, “DISABLED”, “UNKNOWN”, “ERROR” or some other string indicating the semantic reason for the returned flag value.
flag_metadata: Option<FlagMetadata>
The provider SHOULD populate the resolution details structure’s flag metadata field.
Implementations§
Source§impl<T> ResolutionDetails<T>
impl<T> ResolutionDetails<T>
Sourcepub fn builder() -> ResolutionDetailsBuilder<T, ((), (), (), ())>
pub fn builder() -> ResolutionDetailsBuilder<T, ((), (), (), ())>
Create a builder for building ResolutionDetails
.
On the builder, call .value(...)
, .variant(...)
(optional), .reason(...)
(optional), .flag_metadata(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of ResolutionDetails
.
Trait Implementations§
Source§impl<T: Clone> Clone for ResolutionDetails<T>
impl<T: Clone> Clone for ResolutionDetails<T>
Source§fn clone(&self) -> ResolutionDetails<T>
fn clone(&self) -> ResolutionDetails<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more