aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/file.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/document/file.rs')
-rw-r--r--src/document/file.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/document/file.rs b/src/document/file.rs
index 9efae42..3ea3afd 100644
--- a/src/document/file.rs
+++ b/src/document/file.rs
@@ -197,6 +197,11 @@ impl DocumentFile {
/// What is due for a document of `epoch` at `heads`, written by this node's `actors`
/// (see the module docs).
+ /// How many of this node's actors the file holds; None before it was written.
+ pub(crate) fn actors(&self) -> Option<usize> {
+ self.lock().as_ref().map(|written| written.actors)
+ }
+
pub(crate) fn due(&self, epoch: Epoch, actors: usize, heads: &[ChangeHash]) -> Due {
let written = self.lock().clone();
let reason = match &written {