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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! The port through which a build stores what actions produce, by content.
//!
//! Its own file because a store keeps bytes somewhere and puts files where a workspace expects
//! them, and this crate does neither: it hands over bytes, asks whether a digest is held, reads
//! held bytes back, and names the path a file belongs at.
//!
//! Responsibilities: [`ContentStore`].
//!
//! Non-responsibilities: implementing it, and deciding what is stored or placed. The first
//! belongs to an adapter crate; the second to the phase that runs actions.
//!
//! This file holds only a trait definition, so it carries no logic to unit-test.
use crateResult;
use crate;
/// Holds content by its digest, and makes held content a file of the workspace.
///
/// What is held is bytes, identified by their digest and by nothing else: whether a file may be
/// run is not part of what is stored, and is said again each time the content is placed.
///
/// `Send + Sync` because several actions store what they produced at once, each from the thread
/// that ran it.