Skip to main content

ProcessManager

Trait ProcessManager 

Source
pub trait ProcessManager: Send + 'static {
    type Event: Send + Clone + 'static;
    type Command: Send + 'static;
    type State: Clone + Send + Default + 'static;
    type Error: Error + Send + 'static;

    // Required methods
    fn correlation_id(event: &Self::Event) -> Option<String>;
    fn transition(
        state: &Self::State,
        event: Self::Event,
    ) -> Result<Transition<Self::State, Self::Command>, Self::Error>;
}
Expand description

Typed state-machine process manager.

Required Associated Types§

Source

type Event: Send + Clone + 'static

Source

type Command: Send + 'static

Source

type State: Clone + Send + Default + 'static

Source

type Error: Error + Send + 'static

Required Methods§

Source

fn correlation_id(event: &Self::Event) -> Option<String>

Source

fn transition( state: &Self::State, event: Self::Event, ) -> Result<Transition<Self::State, Self::Command>, Self::Error>

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.

Implementors§