mybatis_sql/
ops_bit_or.rs1use crate::ops::BitOr;
2use crate::ops::Value;
3
4impl BitOr for Value {
5 type Output = bool;
6
7 fn op_bitor(self, rhs: Self) -> Self::Output {
8 self.as_bool().unwrap_or(false) | rhs.as_bool().unwrap_or(false)
9 }
10}
11
12impl BitOr<Value> for bool {
13 type Output = bool;
14
15 fn op_bitor(self, rhs: Value) -> Self::Output {
16 self | rhs.as_bool().unwrap_or(false)
17 }
18}
19
20impl BitOr<Value> for &Value {
22 type Output = bool;
23
24 fn op_bitor(self, rhs: Value) -> Self::Output {
25 self.as_bool().unwrap_or(false) | rhs.as_bool().unwrap_or(false)
26 }
27}
28impl BitOr<&Value> for &Value {
29 type Output = bool;
30
31 fn op_bitor(self, rhs: &Value) -> Self::Output {
32 self.as_bool().unwrap_or(false) | rhs.as_bool().unwrap_or(false)
33 }
34}
35impl BitOr<&&Value> for &Value {
36 type Output = bool;
37
38 fn op_bitor(self, rhs: &&Value) -> Self::Output {
39 self.as_bool().unwrap_or(false) | rhs.as_bool().unwrap_or(false)
40 }
41}
42
43impl BitOr<bool> for &Value {
44 type Output = bool;
45
46 fn op_bitor(self, rhs: bool) -> Self::Output {
47 self.as_bool().unwrap_or(false) | rhs
48 }
49}
50
51impl BitOr<&Value> for Value {
53 type Output = bool;
54
55 fn op_bitor(self, rhs: &Value) -> Self::Output {
56 self.as_bool().unwrap_or(false) | rhs.as_bool().unwrap_or(false)
57 }
58}
59
60impl BitOr<&Value> for bool {
61 type Output = bool;
62
63 fn op_bitor(self, rhs: &Value) -> Self::Output {
64 self | rhs.as_bool().unwrap_or(false)
65 }
66}
67
68impl BitOr<&&Value> for Value {
69 type Output = bool;
70
71 fn op_bitor(self, rhs: &&Value) -> Self::Output {
72 self.as_bool().unwrap_or(false) | rhs.as_bool().unwrap_or(false)
73 }
74}
75
76impl BitOr<&&Value> for bool {
77 type Output = bool;
78
79 fn op_bitor(self, rhs: &&Value) -> Self::Output {
80 self | rhs.as_bool().unwrap_or(false)
81 }
82}