Skip to main content

QueryArgs

Trait QueryArgs 

Source
pub trait QueryArgs {
    // Required method
    fn to_params(&self) -> Vec<(&str, DecodedValue)>;
}
Expand description

The collection of arguments a query method takes. &() when there are none, a tuple for positional $0/$1/…, a HashMap or a slice of (name, value) pairs for named ones.

Required Methods§

Source

fn to_params(&self) -> Vec<(&str, DecodedValue)>

Borrows the names out of self (which the query method holds by reference for the whole call) so only the values are cloned.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl QueryArgs for ()

Source§

impl QueryArgs for HashMap<&str, ValueOpt>

Keyed by ValueOpt rather than by any V: QueryArg, because ValueOpt deliberately does not implement QueryArg: it is built from one via a blanket From, and making it a QueryArg too would collide with the standard library’s reflexive impl<T> From<T> for T.

Source§

impl QueryArgs for HashMap<String, ValueOpt>

Source§

impl QueryArgs for Vec<(&str, DecodedValue)>

Source§

impl QueryArgs for [(&str, DecodedValue)]

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg, E: QueryArg, F: QueryArg, G: QueryArg, H: QueryArg, I: QueryArg, J: QueryArg, K: QueryArg, L: QueryArg> QueryArgs for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg, E: QueryArg, F: QueryArg, G: QueryArg, H: QueryArg, I: QueryArg, J: QueryArg, K: QueryArg> QueryArgs for (A, B, C, D, E, F, G, H, I, J, K)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg, E: QueryArg, F: QueryArg, G: QueryArg, H: QueryArg, I: QueryArg, J: QueryArg> QueryArgs for (A, B, C, D, E, F, G, H, I, J)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg, E: QueryArg, F: QueryArg, G: QueryArg, H: QueryArg, I: QueryArg> QueryArgs for (A, B, C, D, E, F, G, H, I)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg, E: QueryArg, F: QueryArg, G: QueryArg, H: QueryArg> QueryArgs for (A, B, C, D, E, F, G, H)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg, E: QueryArg, F: QueryArg, G: QueryArg> QueryArgs for (A, B, C, D, E, F, G)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg, E: QueryArg, F: QueryArg> QueryArgs for (A, B, C, D, E, F)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg, E: QueryArg> QueryArgs for (A, B, C, D, E)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg, D: QueryArg> QueryArgs for (A, B, C, D)

Source§

impl<A: QueryArg, B: QueryArg, C: QueryArg> QueryArgs for (A, B, C)

Source§

impl<A: QueryArg, B: QueryArg> QueryArgs for (A, B)

Source§

impl<A: QueryArg> QueryArgs for (A,)

Source§

impl<const N: usize> QueryArgs for [(&str, DecodedValue); N]

Implementors§