Docs.rs
  • ego-tree-0.10.0
    • ego-tree 0.10.0
    • Permalink
    • Docs.rs crate page
    • ISC
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • causal-agent
    • cfvescovo
    • Dependencies
      • serde ^1.0.209 normal optional
      • serde ^1.0.209 dev
      • serde_test ^1.0.177 dev
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate ego_tree

ego_tree0.10.0

  • All Items

Sections

  • Behavior
  • Examples

Crate Items

  • Modules
  • Macros
  • Structs

Crates

  • ego_tree

Crate ego_tree

Source
Expand description

Vec-backed ID-tree.

§Behavior

  • Trees have at least a root node;
  • Nodes have zero or more ordered children;
  • Nodes have at most one parent;
  • Nodes can be detached (orphaned) but not removed;
  • Node parent, next sibling, previous sibling, first child and last child can be accessed in constant time;
  • All methods perform in constant time;
  • All iterators perform in linear time.

§Examples

let mut tree = ego_tree::Tree::new('a');
let mut root = tree.root_mut();
root.append('b');
let mut c = root.append('c');
c.append('d');
c.append('e');
#[macro_use] extern crate ego_tree;
let tree = tree!('a' => { 'b', 'c' => { 'd', 'e' } });

Modules§

iter
Iterators.

Macros§

tree
Creates a tree from expressions.

Structs§

NodeId
Node ID.
NodeMut
Node mutator.
NodeRef
Node reference.
Tree
Vec-backed ID-tree.

Results

Settings
Help
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.