1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
use crate::Query;
use ql2::term::TermType;

pub trait Arg {
    fn into_query(self) -> Query;
}

impl Arg for Query {
    fn into_query(self) -> Query {
        Self::new(TermType::Nth).with_arg(self)
    }
}

impl Arg for isize {
    fn into_query(self) -> Query {
        Query::from_json(self).into_query()
    }
}