From a9ea8e9cedaf45553b609857d9e1b8e3e43cefb9 Mon Sep 17 00:00:00 2001 From: Marco Neumann Date: Tue, 13 Jul 2021 10:37:00 +0200 Subject: [PATCH] docs: add docstring to some `Partition` methods --- server/src/db/catalog/partition.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/db/catalog/partition.rs b/server/src/db/catalog/partition.rs index db2e9b79e6..a995fe452e 100644 --- a/server/src/db/catalog/partition.rs +++ b/server/src/db/catalog/partition.rs @@ -271,18 +271,22 @@ impl Partition { self.chunks().map(|x| x.read().summary()) } + /// Return reference to partition-specific metrics. pub fn metrics(&self) -> &PartitionMetrics { &self.metrics } + /// Return immutable reference to current persistence window, if any. pub fn persistence_windows(&self) -> Option<&PersistenceWindows> { self.persistence_windows.as_ref() } + /// Return mutable reference to current persistence window, if any. pub fn persistence_windows_mut(&mut self) -> Option<&mut PersistenceWindows> { self.persistence_windows.as_mut() } + /// Set persistence window to new value. pub fn set_persistence_windows(&mut self, windows: PersistenceWindows) { self.persistence_windows = Some(windows); }