toasty_core/stmt/
op_set.rs

1use std::fmt;
2
3#[derive(Copy, Clone, PartialEq)]
4pub enum SetOp {
5    Union,
6    Except,
7    Intersect,
8}
9
10impl SetOp {}
11
12impl fmt::Display for SetOp {
13    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14        match self {
15            SetOp::Union => "UNION".fmt(f),
16            SetOp::Except => "EXCEPT".fmt(f),
17            SetOp::Intersect => "INTERSECT".fmt(f),
18        }
19    }
20}
21
22impl fmt::Debug for SetOp {
23    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
24        fmt::Display::fmt(self, f)
25    }
26}