dittolive_ditto::dql

Trait IntoQuery

Source
pub trait IntoQuery {
    type Args;

    // Required method
    fn into_query(self) -> Result<QueryV2<Self::Args>, DittoError>;
}
Expand description

Types which can be used to construct a QueryV2.

The main implementors are:

  • String types (e.g. String, &str, etc.)
  • Tuples (S, A), where S is a string type, and A implements Serialize

This conversion may be fallible.

Note that, due to historical naming reasons, this trait is not used to create a Query.

Required Associated Types§

Source

type Args

The type of the arguments provided with this query

Required Methods§

Source

fn into_query(self) -> Result<QueryV2<Self::Args>, DittoError>

Convert this object into a QueryV2

Implementations on Foreign Types§

Source§

impl IntoQuery for String

Source§

impl<Q> IntoQuery for &Q
where Q: ToOwned + ?Sized, Q::Owned: IntoQuery,

Source§

impl<Q, A> IntoQuery for (Q, A)
where Q: IntoQuery<Args = ()>, A: Serialize,

Implementors§

Source§

impl<A> IntoQuery for QueryV2<A>

A query implements IntoQuery :)

Source§

type Args = A