Struct rocket::request::Query[][src]

pub struct Query<'q>(_);

Iterator over form items in a query string.

The Query type exists to separate, at the type level, form form items (FormItems) from query form items (Query). A value of type Query is passed in to implementations of the FromQuery trait by Rocket's code generation for every trailing query parameter, <params..> below:

fn user(params: T) { /* ... */ }


A value of type Query can only be used as an iterator over values of type FormItem. As such, its usage is equivalent to that of FormItems, and we refer you to its documentation for further details.


use rocket::request::Query;

fn from_query(query: Query) -> Result {
    for item in query {
        println!("query key/value: ({}, {})", item.key, item.value);

    // ...

Trait Implementations

impl<'q> Clone for Query<'q>[src]

impl<'q> Debug for Query<'q>[src]

impl<'q> Iterator for Query<'q>[src]

type Item = FormItem<'q>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'q> RefUnwindSafe for Query<'q>[src]

impl<'q> Send for Query<'q>[src]

impl<'q> Sync for Query<'q>[src]

impl<'q> Unpin for Query<'q>[src]

impl<'q> UnwindSafe for Query<'q>[src]

Blanket Implementations

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

impl<T, I> AsResult<T, I> for T where
    I: Input, 

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> IntoCollection<T> for T

impl<I> IntoIterator for I where
    I: Iterator

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<I> IteratorRandom for I where
    I: Iterator

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,