MCPcopy Create free account
hub / github.com/FeatureProbe/server-sdk-rust / eval

Method eval

src/evaluate.rs:166–189  ·  view source on GitHub ↗
(
        &self,
        user: &FPUser,
        segment_repo: &HashMap<String, Segment>,
        toggle_repo: &HashMap<String, Toggle>,
        is_detail: bool,
        deep: u8,
        debug_until_t

Source from the content-addressed store, hash-verified

164
165impl Toggle {
166 pub fn eval(
167 &self,
168 user: &FPUser,
169 segment_repo: &HashMap<String, Segment>,
170 toggle_repo: &HashMap<String, Toggle>,
171 is_detail: bool,
172 deep: u8,
173 debug_until_time: Option<u64>,
174 ) -> EvalDetail<Value> {
175 let eval_param = EvalParams {
176 user,
177 segment_repo,
178 toggle_repo,
179 key: &self.key,
180 is_detail,
181 variations: &self.variations,
182 debug_until_time,
183 };
184
185 match self.do_eval(&eval_param, deep) {
186 Ok(eval) => eval,
187 Err(e) => self.disabled_variation(&eval_param, Some(e.to_string())),
188 }
189 }
190
191 fn do_eval(
192 &self,

Calls 2

do_evalMethod · 0.80
disabled_variationMethod · 0.80