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

Method logical_and_op

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

Source from the content-addressed store, hash-verified

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>() {
70 return Ok(Box::new(BoolValue::new(self.value && other_bool.value)));
71 }
72 Err("Unexpected type to perform `&&` with".to_string())
73 }
74
75 fn logical_xor_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
76 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