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

Method meet

src/evaluate.rs:441–450  ·  view source on GitHub ↗
(&self, user: &FPUser, segment_repo: Option<&HashMap<String, Segment>>)

Source from the content-addressed store, hash-verified

439
440impl Condition {
441 pub fn meet(&self, user: &FPUser, segment_repo: Option<&HashMap<String, Segment>>) -> bool {
442 match &self.r#type {
443 ConditionType::String => self.match_string(user, &self.predicate),
444 ConditionType::Segment => self.match_segment(user, &self.predicate, segment_repo),
445 ConditionType::Number => self.match_ordering::<f64>(user, &self.predicate),
446 ConditionType::Semver => self.match_ordering::<Version>(user, &self.predicate),
447 ConditionType::Datetime => self.match_timestamp(user, &self.predicate),
448 _ => false,
449 }
450 }
451
452 fn match_segment(
453 &self,

Callers 2

allowMethod · 0.80
serve_variationMethod · 0.80

Calls 3

match_stringMethod · 0.80
match_segmentMethod · 0.80
match_timestampMethod · 0.80

Tested by

no test coverage detected