minerva 0.2.0

Causal ordering for distributed systems
//! The mark store's [`DotStore`] instance: pure delegation to the payload
//! store it carries, so every axis law (support exactness, the survivor
//! law, content-follows-the-dot, the covered-pair semilattice, fiber-wise
//! restriction) is inherited rather than re-derived, and the conformance
//! harness holds it beside the other instances. The provided methods keep
//! their defaults: the store is support-only (no recording plane), so the
//! bare `novel_to` is already the exact witnessed selection, and no cost
//! seam has a number naming it.

use super::super::{Dot, DotSet, DotStore};
use super::Scholia;

impl<T: Clone> DotStore for Scholia<T> {
    fn dots(&self) -> impl Iterator<Item = Dot> + '_ {
        self.marks.dots()
    }

    fn is_bottom(&self) -> bool {
        self.marks.is_bottom()
    }

    fn causal_merge(&self, self_context: &DotSet, other: &Self, other_context: &DotSet) -> Self {
        Self {
            marks: self
                .marks
                .causal_merge(self_context, &other.marks, other_context),
        }
    }

    fn restrict(&self, roster: impl IntoIterator<Item = u32>) -> Self {
        Self {
            marks: self.marks.restrict(roster),
        }
    }

    fn novel_to(&self, context: &DotSet) -> Self {
        Self {
            marks: self.marks.novel_to(context),
        }
    }
}