Skip to content

grafeo-common

Foundation types, memory allocators, and utilities.

Types

use grafeo_common::types::{NodeId, EdgeId, Value, LogicalType};

NodeId / EdgeId

let node_id = NodeId(42);
let edge_id = EdgeId(100);

Value

let v = Value::Int64(42);
let v = Value::String("hello".into());
let v = Value::List(vec![Value::Int64(1), Value::Int64(2)]);

LogicalType

let t = LogicalType::Int64;
let t = LogicalType::String;
let t = LogicalType::List(Box::new(LogicalType::Int64));

Memory

use grafeo_common::memory::{Arena, Pool};

let arena = Arena::new();
let data = arena.alloc(MyStruct::new());

Utilities

use grafeo_common::utils::{FxHashMap, FxHashSet};

let map: FxHashMap<String, i64> = FxHashMap::default();