1 stable release

new 1.0.0 Feb 16, 2025

#619 in Data structures

Download history 76/week @ 2025-02-11

76 downloads per month

MIT license

13KB
266 lines

RADYX - A Basic Radix Tree Implementation

A Rust implementation of a Radix Tree (also known as a Compact Prefix Tree) designed to be efficient, scalable, and easy to use. Radix Trees are widely used in applications such as autocomplete systems, routing tables, and prefix-based search.

Installation

Add the following to your Cargo.toml:

[dependencies]
radyx = "*"

or use the cargo cli

cargo add radyx

Usage

use radyx::Radyx;

let mut node: Radyx<&str> = Radyx::default();

node.insert("/home", "Home");
node.insert("/nothome", "Elsewhere");

assert_eq!(Some(&"Home"), node.get("/home"));

lib.rs:

RADYX - A Basic Radix Tree Implementation

A Rust implementation of a Radix Tree (also known as a Compact Prefix Tree) designed to be efficient, scalable, and easy to use. Radix Trees are widely used in applications such as autocomplete systems, routing tables, and prefix-based search.

Installation

Add the following to your Cargo.toml:

[dependencies]
radyx = "*"

or use the cargo cli

cargo add radyx

Usage

use radyx::Radyx;

let mut node: Radyx<&str> = Radyx::default();

node.insert("/home", "Home");
node.insert("/nothome", "Elsewhere");

assert_eq!(Some(&"Home"), node.get("/home"));

No runtime deps