Skip to main content

StateRegistry

Trait StateRegistry 

Source
pub trait StateRegistry:
    Send
    + Sync
    + 'static { }
Expand description

Marker trait for the type-level state registry.

The state registry is a type-level set represented as nested tuples:

  • () represents the empty set
  • (T, S) represents the set containing T plus all types in S

This enables compile-time verification that state types are registered before they are used by handlers.

Implementations on Foreign Types§

Source§

impl StateRegistry for ()

Source§

impl<T: Send + Sync + 'static, S: StateRegistry> StateRegistry for (T, S)

Implementors§