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

Method logical_or_op

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

Source from the content-addressed store, hash-verified

59 }
60
61 fn logical_or_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
62 if let Some(other_bool) = other.as_any().downcast_ref::<BoolValue>() {
63 return Ok(Box::new(BoolValue::new(self.value || other_bool.value)));
64 }
65 Err("Unexpected type to perform `||` with".to_string())
66 }
67
68 fn logical_and_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
69 if let Some(other_bool) = other.as_any().downcast_ref::<BoolValue>() {

Callers

nothing calls this directly

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected