minerva 0.2.0

Causal ordering for distributed systems
//! The move record'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 record is support-only (no recording plane), so the
//! bare `novel_to` is already the exact witnessed selection.

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

impl DotStore for Metatheses {
    fn dots(&self) -> impl Iterator<Item = Dot> + '_ {
        self.moves.dots()
    }

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

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

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

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