ControlFlowProtocol

Trait ControlFlowProtocol 

Source
pub trait ControlFlowProtocol:
    Clone
    + Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn error<E: Debug>(e: E) -> Self;
}
Expand description

The fundamental contract for data flowing through the system.

Users implement this on their own Enum to define their domain-specific data types. This trait ensures that any data passed through the causal graph satisfies basic requirements like threading support (Send + Sync), debugging, and cloning.

Use this to define the “Protocol” (the vocabulary) of your causal system.

Required Methods§

Source

fn error<E: Debug>(e: E) -> Self

A standard way to represent a protocol-level 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§