pub struct Query<T>(pub T);Expand description
Extracts typed query string parameters.
§Example
use typeway_server::Query;
#[derive(serde::Deserialize)]
struct Pagination { page: u32, per_page: u32 }
async fn list_users(Query(p): Query<Pagination>) -> String {
format!("page={}, per_page={}", p.page, p.per_page)
}Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: DeserializeOwned + Send> FromRequestParts for Query<T>
impl<T: DeserializeOwned + Send> FromRequestParts for Query<T>
Auto Trait Implementations§
impl<T> Freeze for Query<T>where
T: Freeze,
impl<T> RefUnwindSafe for Query<T>where
T: RefUnwindSafe,
impl<T> Send for Query<T>where
T: Send,
impl<T> Sync for Query<T>where
T: Sync,
impl<T> Unpin for Query<T>where
T: Unpin,
impl<T> UnsafeUnpin for Query<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Query<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more