pub struct RawForm(pub Bytes);
Expand description
Extractor that extracts raw form requests.
For GET
requests it will extract the raw query. For other methods it extracts the raw
application/x-www-form-urlencoded
encoded request body.
§Example
use axum::{
extract::RawForm,
routing::get,
Router
};
async fn handler(RawForm(form): RawForm) {}
let app = Router::new().route("/", get(handler));
Tuple Fields§
§0: Bytes
Trait Implementations§
Source§impl<S> FromRequest<S> for RawForm
impl<S> FromRequest<S> for RawForm
Source§type Rejection = RawFormRejection
type Rejection = RawFormRejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Auto Trait Implementations§
impl !Freeze for RawForm
impl RefUnwindSafe for RawForm
impl Send for RawForm
impl Sync for RawForm
impl Unpin for RawForm
impl UnwindSafe for RawForm
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes