pub struct ActiveViewMarker { /* private fields */ }Expand description
The selected saved view associated with live board state (data-model §4).
The marker identifies a definition; it does not own the live filter state and cannot overwrite it. Reapplying the same view produces an equal marker, which is what makes “mark active” idempotent.
Implementations§
Source§impl ActiveViewMarker
impl ActiveViewMarker
Sourcepub fn new(
view_id: ViewId,
applied_plan: ViewPlan,
source: Option<ViewSurface>,
) -> Self
pub fn new( view_id: ViewId, applied_plan: ViewPlan, source: Option<ViewSurface>, ) -> Self
A marker for a view, carrying the normalized plan that was applied.
Sourcepub fn with_applied_at(self, applied_at: impl Into<String>) -> Self
pub fn with_applied_at(self, applied_at: impl Into<String>) -> Self
Attach an audit/display timestamp. Caller-supplied so the marker stays deterministic and the service needs no clock.
Sourcepub fn applied_plan(&self) -> &ViewPlan
pub fn applied_plan(&self) -> &ViewPlan
The normalized plan that was applied when the marker was set.
Sourcepub fn applied_at(&self) -> Option<&str>
pub fn applied_at(&self) -> Option<&str>
The optional timestamp, for display.
Sourcepub const fn source(&self) -> Option<ViewSurface>
pub const fn source(&self) -> Option<ViewSurface>
The surface the marker came from, when it is known.
Sourcepub fn divergence(&self, saved: &ViewPlan, live: &ViewPlan) -> ViewDivergence
pub fn divergence(&self, saved: &ViewPlan, live: &ViewPlan) -> ViewDivergence
Compare live state against the saved definition’s plan, keeping this marker’s identity on the report.
Trait Implementations§
Source§impl Clone for ActiveViewMarker
impl Clone for ActiveViewMarker
Source§impl Debug for ActiveViewMarker
impl Debug for ActiveViewMarker
Source§impl PartialEq for ActiveViewMarker
impl PartialEq for ActiveViewMarker
impl StructuralPartialEq for ActiveViewMarker
Auto Trait Implementations§
impl Freeze for ActiveViewMarker
impl RefUnwindSafe for ActiveViewMarker
impl Send for ActiveViewMarker
impl Sync for ActiveViewMarker
impl Unpin for ActiveViewMarker
impl UnsafeUnpin for ActiveViewMarker
impl UnwindSafe for ActiveViewMarker
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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