Struct RawQuery

pub struct RawQuery(pub Option<String>);

Extractor that extracts the raw query string, without parsing it.

Example

use axum::{
    extract::RawQuery,
    routing::get,
    Router,
};
use futures_util::StreamExt;

async fn handler(RawQuery(query): RawQuery) {
    // ...
}

let app = Router::new().route("/users", get(handler));
# let _: Router = app;

Fields

0: Option<String>

Trait Implementations

impl Debug for RawQuery

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<S> FromRequestParts<S> for RawQuery where S: Send + Sync,

type Rejection = never;
async fn from_request_parts(parts: &mut Parts, _state: &S) -> Result<Self, Self::Rejection>

Auto Trait Implementations

impl Freeze for RawQuery

impl RefUnwindSafe for RawQuery

impl Send for RawQuery

impl Sync for RawQuery

impl Unpin for RawQuery

impl UnsafeUnpin for RawQuery

impl UnwindSafe for RawQuery

Blanket Implementations

impl<S, T> FromRequest<S, ViaParts> for RawQuery where S: Send + Sync, T: FromRequestParts<S>,

type Rejection = <T as FromRequestParts<S>>::Rejection;
fn from_request(req: Request<Body>, state: &S) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for RawQuery where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for RawQuery where ST: ?Sized, DT: ?Sized,

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for RawQuery

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for RawQuery

impl<T> Read<Exclusive, BecauseExclusive> for RawQuery where T: ?Sized,

impl<T> Same for RawQuery

type Output = T;

impl<T> WithSubscriber for RawQuery

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

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

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

fn vzip(self) -> V