Trait reql::commands::WithArgs [] [src]

pub trait WithArgs {
    fn with_args<T>(&self, args: T) -> Command where T: ToArg;
}

Specify optional arguments to a ReQL command

Normally, you should use the args!() macro to pass arguments to a command that also takes optional arguments. If the command takes at least one argument, you don't need to call with_args. However, some commands like error and delete do not have any required arguments but yet they have optional ones. That's when with_args comes in.

Example

Delete all documents from the table comments without waiting for the operation to be flushed to disk.

r.table("comments").delete().with_args(args!({durability: "soft"}));

Required Methods

Implementors