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::{DriverKind, EdgeId, FanoutKind, NodeId};

#[test]
fn ids_display_and_index() {
  assert_eq!(NodeId::new(3).index(), 3);
  assert_eq!(NodeId::new(3).to_string(), "node#3");
  assert_eq!(EdgeId::new(7).index(), 7);
  assert_eq!(EdgeId::new(7).to_string(), "edge#7");
}

#[test]
fn driver_kind_names() {
  assert_eq!(DriverKind::Async.as_str(), "async");
  assert_eq!(DriverKind::Thread.as_str(), "thread");
  assert!(DriverKind::Async.is_async());
}

#[test]
fn fanout_kind_names_and_variants() {
  assert_eq!(FanoutKind::Direct.as_str(), "direct");
  assert_eq!(FanoutKind::Broadcast.as_str(), "broadcast");
  assert_eq!(FanoutKind::Group.as_str(), "group");
  assert!(FanoutKind::Group.is_group());
  assert_eq!(FanoutKind::Group.to_string(), "group");
}