pub struct ScanViewState {
pub provider: String,
pub options: ScanViewOptions,
pub clock: Vec<ClockSpan>,
pub annotations: Vec<RowAnnotationAt>,
pub annotations_version: u64,
}Expand description
Per-view scan state. OM.A3’s gr reads the root back out of this so a
refresh re-scans what the view already shows rather than resetting to the
current working directory.
Fields§
§provider: StringThe provider name this view was opened under.
gr re-opens the view by name, and the name is the VIEW’s, not this
module’s: a scan view declared by a plugin is called whatever that
plugin called it. Before this the refresh handler re-emitted a
hardcoded "agenda", so a refresh in any other scan view would have
gone to org’s — which is the sort of thing a generic mode with an
org-shaped constant in it does.
options: ScanViewOptions§clock: Vec<ClockSpan>OA.14b: every clocked span the last completed scan saw, across every file and source, unfiltered by date.
Held per view rather than recomputed because the report’s RANGE is a
display choice — gD switches between day, week, month and year — and
re-walking the corpus to answer a question the data already contains
would make a toggle cost a scan. org-agenda-clockreport-mode (OA.16)
filters on day and rolls the totals up each span’s outline path.
Written once at the end of a scan, not incrementally: a half-filled report is a wrong report, and unlike rows — which stream so the view fills in — nobody is reading a total until it is a total.
annotations: Vec<RowAnnotationAt>HB.5: the rows a scan asked to hang below its own, already translated into COMPOSED coordinates.
Translated at publish rather than at paint, for composed_row_spans’
reason: a row’s composed index is not its index among its own file’s
rows — the sort interleaves files — and the arithmetic belongs where the
excerpt layout is in hand, not in a provider that would have to
reconstruct it.
annotations_version: u64Bumped whenever annotations is written, so the
cells worker re-runs the provider’s collect without waiting for the
document’s line count to move. A refresh that returns the same NUMBER
of rows with different annotations is the case this exists for.
Trait Implementations§
Source§impl Clone for ScanViewState
impl Clone for ScanViewState
Source§fn clone(&self) -> ScanViewState
fn clone(&self) -> ScanViewState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ScanViewState
impl RefUnwindSafe for ScanViewState
impl Send for ScanViewState
impl Sync for ScanViewState
impl Unpin for ScanViewState
impl UnsafeUnpin for ScanViewState
impl UnwindSafe for ScanViewState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more