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

Method or_op

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

Source from the content-addressed store, hash-verified

106 }
107
108 fn or_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
109 if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() {
110 let value = self.value | other_int.value;
111 return Ok(Box::new(IntValue::new(value)));
112 }
113 Err("Unexpected type to perform `|` with".to_string())
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>() {

Callers 1

evaluate_bitwiseFunction · 0.45

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected