kmp-domain 0.17.0

Domain model of the Kernel Memory Protocol: aggregates, value objects, repositories and projections, with no IO
Documentation
1
2
3
4
5
6
7
8
use crate::{AdjacencyPage, AdjacencyRequest, NodeProjection, PortError};

/// The coordinator borrows one consistent snapshot for its entire search.
/// Implementations must not open a new transaction per method call.
pub trait TraceSnapshotReader {
    fn node(&self, id: &str) -> Result<Option<NodeProjection>, PortError>;
    fn adjacency(&self, request: &AdjacencyRequest) -> Result<AdjacencyPage, PortError>;
}