Skip to main content

tessera_shard/
state.rs

1//! Shard state handle and storage primitives.
2//!
3//! ## Usage
4//!
5//! Use `ShardState` to access shard-scoped data managed by the router.
6
7/// Public handle APIs for shard-scoped state access.
8pub mod handle;
9
10pub use handle::{ShardState, ShardStateError};
11
12/// Describes the lifecycle of shard state values.
13#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
14pub enum ShardStateLifeCycle {
15    /// State exists for the lifetime of one router controller instance.
16    Scope,
17    /// State exists for the lifetime of a route instance.
18    Shard,
19}