Trait reql::command::IntoCommandArg
[−]
[src]
pub trait IntoCommandArg: Debug { fn to_arg(&self) -> Result<(Argument, Options)>; }
A type that can be passed into a ReQL command
Required Methods
fn to_arg(&self) -> Result<(Argument, Options)>
Defines how a type can be safely passed into a command.
A successful result returns a tuple as (argument, options). An argument is the main argument that is mandatory for commands that do accept at least one argument. Options is a map of optional options that a command can accept.
Both arguments and options are returned as serialised strings.
Implementors
impl<'a> IntoCommandArg for &'a str
impl IntoCommandArg for String
impl IntoCommandArg for Value
impl IntoCommandArg for Object
impl<T> IntoCommandArg for (T, Object) where T: IntoCommandArg
impl IntoCommandArg for Command
impl IntoCommandArg for ()
impl IntoCommandArg for bool
impl IntoCommandArg for char
impl IntoCommandArg for u8
impl IntoCommandArg for u16
impl IntoCommandArg for u32
impl IntoCommandArg for u64
impl IntoCommandArg for usize
impl IntoCommandArg for i8
impl IntoCommandArg for i16
impl IntoCommandArg for i32
impl IntoCommandArg for i64
impl IntoCommandArg for isize
impl IntoCommandArg for f32
impl IntoCommandArg for f64