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

Method and_op

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

Source from the content-addressed store, hash-verified

114 }
115
116 fn and_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
117 if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() {
118 let value = self.value & other_int.value;
119 return Ok(Box::new(IntValue::new(value)));
120 }
121 Err("Unexpected type to perform `&` with".to_string())
122 }
123
124 fn xor_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
125 if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() {

Callers 1

evaluate_bitwiseFunction · 0.45

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected