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::LaneIdent;

/// The zero-configuration lane is BCP-47's own word for *undetermined*, not one invented here.
#[test]
fn the_default_lane_is_the_standards_own_word() {
  assert_eq!(&**LaneIdent::UND, "und");
  assert_eq!(LaneIdent::new("und"), LaneIdent::UND);
}

/// **IT VALIDATES NOTHING** — the neutral layer does not read this word, so there is no check here
/// to write. Every one of these is a legal lane key as far as this type is concerned.
#[test]
fn every_word_is_a_lane_key() {
  for word in ["", "zh", "zh-Hant", "zh_hant", "ключ", "a b c", "!!"] {
    assert_eq!(&**LaneIdent::new(word), word);
  }
}

/// The borrow trio the `borrowed_name!` construction promises, spent the way a roster spends it.
#[test]
fn a_key_is_a_str_at_the_abi() {
  let key = LaneIdent::new("zh");

  assert_eq!(key.as_ref() as &str, "zh");
  assert_eq!(key.len(), 2, "Deref reaches str's own methods");
  assert_eq!(LaneIdent::new("zh"), key);
  assert_ne!(
    LaneIdent::new("ZH"),
    key,
    "the type compares bytes; the FOLD is the gate's"
  );
}