Skip to main content

component

Function component 

Source
pub fn component<S, V, St, I, Step, Out>(
    initial: I,
    step: Step,
    output: Out,
) -> ErasedComponent<S, V>
where S: Send + Sync + 'static, V: 'static, St: Send + 'static, I: Fn() -> St + Send + Sync + 'static, Step: Fn(St, &Fact) -> St + Send + Sync + 'static, Out: Fn(&St) -> (V, Vec<Transition<S>>) + Send + Sync + 'static,