1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Caller-owned typed workspace lifecycle (RFC 005).
//!
//! [`DeviceWorkspace`] is the single essential lifecycle method (reset-on-entry);
//! [`DeviceWorkspaceDiagnostic`] is an always-available, ungated compact-diagnostic
//! extension; [`WorkspaceFor`] associates a solver family with its workspace type
//! and footprint. Concrete workspaces and solver kernels are RFC 006-owned.
use DiagnosticSnapshot;
/// Caller-owned solver workspace lifecycle.
///
/// A device workspace is owned by the caller, passed by unique `&mut`, and safe
/// to discard or immediately reuse after any solver outcome (poison-free reuse,
/// RFC 005 §7). The lifecycle core is a single logical initialization step.
/// Always-available compact diagnostics for a device workspace.
///
/// Kept separate from [`DeviceWorkspace`] so the lifecycle core stays minimal.
/// This accessor and [`DiagnosticSnapshot`] are never gated by the
/// `diagnostic-snapshot` feature (RFC 005 §10, decision M4); that feature governs
/// only richer/optional diagnostics.
/// Associates a solver family `P` with its workspace type and footprint.
///
/// The concrete `P` problem families and `Workspace` shapes are RFC 006-owned;
/// this trait fixes only the lifecycle/sizing contract.