1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use crate::atom::AtomKind;

pub trait Direction: Clone {
    const KIND: AtomKind;
}

#[derive(Default, Clone, Debug)]
pub struct In {}

#[derive(Default, Clone, Debug)]
pub struct Out {}

#[derive(Default, Clone, Debug)]
pub struct Local {}

#[derive(Default, Clone, Debug)]
pub struct InOut {}

impl Direction for In {
    const KIND: AtomKind = AtomKind::InputParameter;
}

impl Direction for Out {
    const KIND: AtomKind = AtomKind::OutputParameter;
}

impl Direction for Local {
    const KIND: AtomKind = AtomKind::LocalSignal;
}

impl Direction for InOut {
    const KIND: AtomKind = AtomKind::InOutParameter;
}