flextablev0.1.0

The Flexible Table
for Rust

One fast, dynamic table for arrays, dictionaries, records and sets.

cargo add flextable

One structure

Sequences and fields, side by side

A table keeps integer keys in an array and everything else in an insertion-ordered hash part. You never choose between a Vec and a HashMap: write fields, push items, nest tables, and read them back in a predictable order.

Learn the core concepts →
src/main.rs
use flextable::{table, Table, Value};

let player = Table::new();
player.set("name", "Ada")?;          // named fields
player.set("level", 7)?;
player.push("sword")?;               // and a sequence
player.push("shield")?;

assert_eq!(player.len(), 2);
assert_eq!(player.field_count(), 4);
assert_eq!(player.get("name"), Value::from("Ada"));

let scores = table![42, 7, 19];
scores.sort()?;
assert_eq!(scores.concat(", ")?, "7, 19, 42");

Features

What's in flextable?

1.1 nsto overwrite a sequence slot
O(1)length, append and lookup
58doc examples compiled and run

Start building with tables

Install the crate and write your first table in about five minutes.