pub struct FormParser;Expand description
Form parser for application/x-www-form-urlencoded content type
Implementations§
Source§impl FormParser
impl FormParser
Sourcepub fn new() -> FormParser
pub fn new() -> FormParser
Create a new FormParser.
§Examples
use reinhardt_core::parsers::form::FormParser;
let parser = FormParser::new();Trait Implementations§
Source§impl Clone for FormParser
impl Clone for FormParser
Source§fn clone(&self) -> FormParser
fn clone(&self) -> FormParser
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormParser
impl Debug for FormParser
Source§impl Default for FormParser
impl Default for FormParser
Source§fn default() -> FormParser
fn default() -> FormParser
Returns the “default value” for a type. Read more
Source§impl Parser for FormParser
impl Parser for FormParser
Source§fn media_types(&self) -> Vec<String>
fn media_types(&self) -> Vec<String>
Get the media types this parser can handle
Source§fn parse<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_content_type: Option<&'life1 str>,
body: Bytes,
_headers: &'life2 HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<ParsedData, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
FormParser: 'async_trait,
fn parse<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_content_type: Option<&'life1 str>,
body: Bytes,
_headers: &'life2 HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<ParsedData, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
FormParser: 'async_trait,
Parse the request body
Auto Trait Implementations§
impl Freeze for FormParser
impl RefUnwindSafe for FormParser
impl Send for FormParser
impl Sync for FormParser
impl Unpin for FormParser
impl UnsafeUnpin for FormParser
impl UnwindSafe for FormParser
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().