Function lifecycle_node

Source
pub fn lifecycle_node<PrepFn, ExecFn, PostFn, Context, Action, PrepOut, ExecOut, PrepFut, ExecFut, PostFut>(
    id: Option<String>,
    prep_fn: PrepFn,
    exec_fn: ExecFn,
    post_fn: PostFn,
) -> impl Node<Context, Action, Output = ExecOut>
where Context: Send + Sync + 'static, Action: ActionType + Send + Sync + 'static, PrepOut: Send + Sync + Clone + 'static, ExecOut: Send + Sync + Clone + 'static, PrepFn: Fn(&mut Context) -> PrepFut + Send + Sync + 'static, ExecFn: Fn(PrepOut) -> ExecFut + Send + Sync + 'static, PostFn: Fn(PrepOut, ExecOut, &mut Context) -> PostFut + Send + Sync + 'static, PrepFut: Future<Output = Result<PrepOut, FloxideError>> + Send + 'static, ExecFut: Future<Output = Result<ExecOut, FloxideError>> + Send + 'static, PostFut: Future<Output = Result<Action, FloxideError>> + Send + 'static,
Expand description

Convenience function to create a lifecycle node from closures