Skip to main content

tract_core/ops/
dummy.rs

1use crate::internal::*;
2
3#[derive(Debug, Clone, new, Hash, PartialEq, Eq)]
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    not_out_of_plan!();
16
17    fn eval(&self, _ctx: &EvalContext, _inputs: TVec<TValue>) -> TractResult<TVec<TValue>> {
18        bail!("eval() called on a Dummy op. This is a bug.")
19    }
20}
21
22impl TypedOp for Dummy {
23    as_op!();
24
25    fn output_facts(&self, _inputs: &[&TypedFact]) -> TractResult<TVec<TypedFact>> {
26        Ok(tvec!())
27    }
28}