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

Method logical_xor_op

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

Source from the content-addressed store, hash-verified

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>() {
77 return Ok(Box::new(BoolValue::new(self.value ^ other_bool.value)));
78 }
79 Err("Unexpected type to perform `^` with".to_string())
80 }
81
82 fn eq_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
83 if let Some(other_bool) = other.as_any().downcast_ref::<BoolValue>() {

Callers 1

evaluate_logicalFunction · 0.45

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected