[][src]Struct lightql::QlRequestTyped

pub struct QlRequestTyped<T> { /* fields omitted */ }

A wrapper around Request where the type is contained.

Methods

impl<T> QlRequestTyped<T>
[src]

Create a new typed request.

Create a typed request from a file path. The file have to end with .(QlType) player_request.query or player_update.mutation etc...

prepare the request with a hasmap for each argument

let mut param_map = Hashmap::new();
param_map.insert("_uuid", "The real value");
let response = Request::new("player(uuid: \"_uuid\") { uuid }", QlType::Query)
    .prepare(param_map)
    .send::<Player>()
    .expect("Player cannot be retrieved");

If the is no args to the query the send should detect it, so you don't need to use prepare.

Force the preparation in certain case that can be usefull.

The send the request and return the requested type.

Trait Implementations

impl<T: Debug> Debug for QlRequestTyped<T>
[src]

Auto Trait Implementations

impl<T> Send for QlRequestTyped<T> where
    T: Send

impl<T> Sync for QlRequestTyped<T> where
    T: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]