Skip to main content

beetry_node/plugin/
decorator.rs

1use beetry_core::BoxNode;
2use beetry_editor_types::spec::node::{NodeKind, NodeName, NodeSpec, NodeSpecKey};
3use beetry_plugin::{
4    Plugin, decorator,
5    node::{DecoratorFactory, DecoratorPluginConstructor, DecoratorReconstructionData},
6};
7
8use crate::{Fail, Invert, Succeed, UntilFailure, UntilSuccess};
9
10decorator!(
11    InvertPlugin: "Invert";
12    child(child),
13    create: Invert::new(child),
14);
15
16decorator!(
17    SucceedPlugin: "Succeed";
18    child(child),
19    create: Succeed::new(child),
20);
21
22decorator!(
23    FailPlugin: "Fail";
24    child(child),
25    create: Fail::new(child),
26);
27
28decorator!(
29    UntilSuccessPlugin: "UntilSuccess";
30    child(child),
31    create: UntilSuccess::new(child),
32);
33
34decorator!(
35    UntilFailurePlugin: "UntilFailure";
36    child(child),
37    create: UntilFailure::new(child),
38);