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
//! Recoverable source handles: `ctx://source/<fragment_id>`.
//!
//! Every fragment the compiler touches stays addressable through one handle
//! scheme so a decision is never a dead end: what was externalized (or only
//! partially packed) can be fetched back. The memoryless core only *mints*
//! handles; resolving them against stored originals is the memory bridge's
//! job (US-002).
use SourceReference;
/// URI scheme prefix of every context source handle.
pub const HANDLE_PREFIX: &str = "ctx://source/";
/// The recoverable address of a fragment's original content. Handles are
/// **content-addressed** (FNV-1a hash of the original bytes — the text for
/// a text fragment, the raw decoded media bytes for a media fragment, see
/// `Analysis::handle_hash` in `context.rs`), never minted from
/// caller-supplied ids — two different fragments sharing a caller id
/// therefore keep two distinct, unambiguous addresses.
pub
/// The content hash behind a `ctx://source/<hash>` handle, or `None` when
/// the handle does not follow the scheme.
pub
/// The source pointer recorded for one distinct fragment.
pub