shamansir/cayley-rust — pull request #2 by shamansir (2014-12-05 00:32:45+00:00)
Title: A major rewrite + updating to latest Rust (docs not finished)

**NB**: Merge only when docs will be fixed

* Rethinking path construction
* Getting rid of mutable `self`, 95% of immutability now
* Using lists with macros helpers instead of "fluent interface" technique

**WAS:**

```rust
let mut film_to_actor = Morphism::start("fta");
film_to_actor.OutP(Predicate("/film/film/starring"))
.OutP(Predicate("/film/performance/actor"));
match graph.find(Vertex::start(AnyNode)
.Has(Predicate("name"), Node("Casablanca"))
.Follow(&mut film_to_actor)
.OutP(Predicate("name"))
.All()) {

Err(error) => panic!(error.to_string()),
Ok(GraphNodes(nodes)) => {
println!("{}",nodes.len());
assert!(nodes.len() > 0);
}
}
```

**NOW:**

```rust
let film_to_actor = morphism!("fta" ->
OutP(Predicate("/film/film/starring")) ->
OutP(Predicate("/film/performance/actor")));
match graph.find(vertex!(AnyNode
-> Has(Predicate("name"), Node("Casablanca"))
-> Follow(&film_to_actor)
-> OutP(Predicate("name"))
=> All)) {

Err(error) => panic!(error.to_string()),
Ok(GraphNodes(nodes)) => {
println!("{}",nodes.len());
assert!(nodes.len() > 0);
}
}
```