statum-core 0.5.1

Compile-time state machine magic for Rust: Zero-boilerplate typestate patterns with automatic transition validation
Documentation

statum-core

statum-core contains shared runtime types used by the Statum workspace.

Public surface:

  • statum_core::Error
  • statum_core::Result<T>

Install

[dependencies]
statum-core = "0.3"

Example

fn ensure_ready(ready: bool) -> statum_core::Result<()> {
    if ready {
        Ok(())
    } else {
        Err(statum_core::Error::InvalidState)
    }
}

Docs