Querio

Trait Querio 

Source
pub trait Querio {
    type QuerioVariable: Strung + IntupleStruct;

    const QUERY: &'static str;

    // Provided methods
    fn querio(hard: &Self::QuerioVariable) -> String { ... }
    fn qrio(
        hard: <<Self as Querio>::QuerioVariable as IntupleStruct>::Intuple,
    ) -> String { ... }
}
Expand description

Marks a struct as query

Required Associated Constants§

Source

const QUERY: &'static str

Required Associated Types§

Source

type QuerioVariable: Strung + IntupleStruct

Specify varaibles using a struct with the Strung-Trait

Provided Methods§

Source

fn querio(hard: &Self::QuerioVariable) -> String

Merges the query string and the in- and output together to the final query and returns it. NOTE: Needed 3 inputs for a project I originally made this crate for, might change to 2 at some point

Source

fn qrio( hard: <<Self as Querio>::QuerioVariable as IntupleStruct>::Intuple, ) -> String

Shorter form of querio, using tuple as params

Examples found in repository?
examples/usage.rs (line 17)
16fn main(){
17    println!("{}",QQ::qrio((501,34)));
18}

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§