1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

use super::*;

#[derive(Clone, Serialize, Deserialize)]
pub(crate) struct Input;

impl Operator for Input {
    fn forward(&mut self, _: &Node) -> Result<()> {
        Err(anyhow!("Input Operator forwards should never be executed"))
    }

    fn backward(&mut self, _: &Node) -> Result<()> {
        Err(anyhow!("Input Operator backwards should never be executed"))
    }
}

impl Display for Input {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "Input")
    }
}