ingraph 0.1.0

A declaration-driven indexing framework: records and nodes are written as Rust types, and the storage rows, the dataflow between them and the GraphQL query surface are emitted from the declaration.
Documentation
use super::Grain;

/// The RULED default: a retrieve that names no grain collapses at the node's OWN key, so seven
/// matching segments of one video are seven results.
#[test]
fn the_default_grain_is_the_nodes_own_key() {
  assert_eq!(Grain::default(), Grain::Own);
}

/// Two grains and no third — the vocabulary is closed, and a `_with` variant is what carries the
/// choice rather than a widening of the bare face.
#[test]
fn the_vocabulary_is_the_two_ruled_words() {
  let both = [Grain::Own, Grain::Root];

  assert_ne!(both[0], both[1]);
  assert_eq!(
    both.iter().filter(|grain| **grain == Grain::Root).count(),
    1
  );
}