reql 0.0.6-alpha2

A native RethinkDB driver
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use ToArg;
use commands::Command;

/// Construct a ReQL JSON object from a native object
pub trait Expr {
    fn expr<T>(&self, value: T) -> Command
        where T: ToArg;
}

impl Expr for Command {
    fn expr<T>(&self, value: T) -> Command
        where T: ToArg
    {
        let mut cmd = Command::new();
        cmd.set_term(value.to_arg());
        cmd
    }
}