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

Method fixed_variation

src/evaluate.rs:315–336  ·  view source on GitHub ↗
(
        &self,
        serve: &Serve,
        eval_param: &EvalParams,
        default_reason: String,
        reason: Option<String>,
    )

Source from the content-addressed store, hash-verified

313 }
314
315 fn fixed_variation(
316 &self,
317 serve: &Serve,
318 eval_param: &EvalParams,
319 default_reason: String,
320 reason: Option<String>,
321 ) -> EvalDetail<Value> {
322 match serve.select_variation(eval_param) {
323 Ok(v) => self.serve_variation(
324 Some(v),
325 concat_reason(default_reason, reason),
326 None,
327 eval_param.debug_until_time,
328 ),
329 Err(e) => self.serve_variation(
330 None,
331 concat_reason(format!("{e:?}"), reason),
332 None,
333 eval_param.debug_until_time,
334 ),
335 }
336 }
337
338 pub fn track_access_events(&self) -> bool {
339 self.track_access_events.unwrap_or(false)

Callers 2

default_variationMethod · 0.80
disabled_variationMethod · 0.80

Calls 3

concat_reasonFunction · 0.85
select_variationMethod · 0.80
serve_variationMethod · 0.80

Tested by

no test coverage detected