MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / lte_op

Method lte_op

crates/gitql-core/src/values/interval.rs:89–95  ·  view source on GitHub ↗
(&self, other: &Box<dyn Value>)

Source from the content-addressed store, hash-verified

87 }
88
89 fn lte_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
90 if let Some(other_interval) = other.as_any().downcast_ref::<IntervalValue>() {
91 let result = self.interval.le(&other_interval.interval);
92 return Ok(Box::new(BoolValue::new(result)));
93 }
94 Err("Unexpected type to perform `<=` with".to_string())
95 }
96
97 fn add_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
98 if let Some(other_interval) = other.as_any().downcast_ref::<IntervalValue>() {

Callers

nothing calls this directly

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected