Crate rline_api

source ·
Expand description

rline_api

rline_api is a Rust library for handling rows and values in a tabular data format.

Modules

  • rline_error: Defines custom error types for the rline library.
  • row: Provides a struct (Row) to represent a set of columns with their values.
  • value: Defines an enum (Value) representing valid row values.

Examples

use rline_api::row::Row;
use rline_api::value::Value;

// Create a new row
let mut row = Row::new();

// Insert values into the row
row.insert("name".to_string(), Value::from("John Doe"));
row.insert("age".to_string(), Value::from(25));

// Serialize the row to JSON
let json_bytes = row.to_bytes_json().unwrap();

// Deserialize the row from JSON
let deserialized_row = Row::from_bytes_json(&json_bytes).unwrap();

// Perform operations with the deserialized row

Usage

Add this to your Cargo.toml:

[dependencies]
rline_api = "0.1.0"

Features

  • Serialize and deserialize rows in JSON and Bincode formats.
  • Handle various types of values within rows.

License

This crate is licensed under the Apache-2.0 License.

Modules