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
54
use fmt;
use AppResult;
use SecretString;
/// Adapter contract for writable configuration backends.
///
/// A `ConfigSink` persists or patches configuration values back to a backend — a file,
/// an in-memory store, or a future remote backend such as Vault, SSM, or a Kubernetes secret.
/// `rskit-config` owns the contract; concrete backends live in their own adapter crates
/// and depend only on this trait.
///
/// Sinks are injected explicitly (never via a global registry) and are object-safe,
/// so callers can hold a `Box<dyn ConfigSink>`.
///
/// Values flow as [`SecretString`] end-to-end. Implementations must never log the plaintext value;
/// only the key may appear in diagnostics.
/// Writing the plaintext to the backing store (e.g. a file) is the sink's intended,
/// explicit persistence — not a leak.