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
50
51
52
53
// SPDX-License-Identifier: Apache-2.0
//! Caller-supplied identity for matching external enforcement boundaries.
//!
//! [`crate::ExternalOwner`] prevents unrelated declarations from being merged;
//! it is not a proof that an operating-system sandbox exists.
use Arc;
/// An opaque proof that two external-enforcement declarations share one owner.
///
/// Cloning an owner preserves its identity. Independent owners do not compare
/// equal, so unrelated external boundaries cannot be composed accidentally.
/// This identity is a trusted caller declaration only; it does not prove that
/// an external sandbox exists or that it enforces the declared boundary.
/// The `Arc<()>` payload stores no platform or harness data: the allocation's
/// identity is the proof, and `Arc::ptr_eq` is the comparison. This keeps the
/// type reusable wherever one trusted enforcement boundary owns both sides.
///
/// This type intentionally has no [`Default`] implementation. Every owner
/// must be created explicitly with [`Self::new`], because a default value
/// would be a fresh owner identity rather than a shared enforcement boundary.
///
/// ```compile_fail
/// use cageforge_policy_compose::ExternalOwner;
/// let _ = ExternalOwner::default();
/// ```
>);