Skip to main content

tract_core/ops/
dummy.rs

1use crate::internal::*;
2
3#[derive(Debug, Clone, new, Hash)]
4pub struct Dummy;
5
6impl Op for Dummy {
7    fn name(&self) -> StaticName {
8        "Dummy".into()
9    }
10
11    op_as_typed_op!();
12}
13
14impl EvalOp for Dummy {
15    fn is_stateless(&self) -> bool {
16        false
17    }
18
19    fn eval(&self, _inputs: TVec<TValue>) -> TractResult<TVec<TValue>> {
20        bail!("eval() called on a Dummy op. This is a bug.")
21    }
22}
23
24impl TypedOp for Dummy {
25    as_op!();
26
27    fn output_facts(&self, _inputs: &[&TypedFact]) -> TractResult<TVec<TypedFact>> {
28        Ok(tvec!())
29    }
30}