pub trait FlowNode {
type Request: Serialize + DeserializeOwned;
// Required methods
fn imports(ctx: &mut ImportCtx<'_>);
fn emit(requests: Vec<Self::Request>, ctx: &mut NodeCtx<'_>) -> Result<()>;
}
Expand description
TODO: clearly verbalize what a FlowNode
encompasses
Required Associated Types§
Sourcetype Request: Serialize + DeserializeOwned
type Request: Serialize + DeserializeOwned
TODO: clearly verbalize what a Request encompasses
Required Methods§
Sourcefn imports(ctx: &mut ImportCtx<'_>)
fn imports(ctx: &mut ImportCtx<'_>)
A list of nodes that this node is capable of taking a dependency on.
Attempting to take a dep on a node that wasn’t imported via this method will result in an error during flow resolution time.
To put it bluntly: This is boilerplate.
We (the flowey devs) are thinking about ways to avoid requiring this method, but do not have a good solution at this time.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.