pub fn variation(&self, index: VariationIndex, reason: Reason) -> Detail<&FlagValue> {
        let (value, variation_index) = match usize::try_from(index) {
            Ok(u) => (self.variations.get(u), Some(index)),
            Err(e) => {
                warn!(
                    "Flag variation index could not be converted to usize. {}",
                    e
                );
                (None, None)
            }
        };

        Detail {
            value,
            variation_index,
            reason,
        }
        .should_have_value(eval::Error::MalformedFlag)
    }
/// Generate a [crate::Detail] response with the given variation and reason.
Generate a [crate::Detail] response with the given variation and reason.
Generate a [ crate :: Detail ] response with the given variation and reason .
pub fn variation(&self, index: VariationIndex, reason: Reason) -> Detail<&FlagValue> {
        let (value, variation_index) = match usize::try_from(index) {
            Ok(u) => (self.variations.get(u), Some(index)),
            Err(e) => {
                warn!(
                    "Flag variation index could not be converted to usize. {}",
                    e
                );
                (None, None)
            }
        };
        Detail {
            value,
            variation_index,
            reason,
        }
        .should_have_value(eval::Error::MalformedFlag)
    }
pub fn variation ( & self , index : VariationIndex , reason : Reason ) -> Detail < & FlagValue > { let ( value , variation_index ) = match usize :: try_from ( index ) { Ok ( u ) => ( self . variations . get ( u ) , Some ( index ) ) , Err ( e ) => { warn ! ( " " e ) ; ( None , None ) } } ; Detail { value , variation_index , reason , } . should_have_value ( eval :: Error :: MalformedFlag ) }
Generate a [crate::Detail] response with the given variation and reason.
Generate a [ crate :: Detail ] response with the given variation and reason .
&self
index
VariationIndex
reason
Reason
&self
index
VariationIndex
reason
Reason