pub struct SerdeBodyParser<R: Resource + Deserialize> { /* private fields */ }
Expand description
A Gneric Body parser using the serde functionality (and Json serialisation)
Implementations§
Source§impl<R> SerdeBodyParser<R>
impl<R> SerdeBodyParser<R>
Sourcepub fn new() -> SerdeBodyParser<R>
pub fn new() -> SerdeBodyParser<R>
create a new parser
Trait Implementations§
Source§impl<R> Key for SerdeBodyParser<R>
impl<R> Key for SerdeBodyParser<R>
Source§impl<R> ParserMiddleware for SerdeBodyParser<R>
impl<R> ParserMiddleware for SerdeBodyParser<R>
Source§fn parse(&self, req: &mut Request<'_, '_>) -> IronResult<Self::Value>
fn parse(&self, req: &mut Request<'_, '_>) -> IronResult<Self::Value>
called befor handing a endpoint with a Body/Options
not that the id in the url is expected to be percent_encoded and will be
decoded to utf-8 before being passed to parse. Illegal UTF-8 encodings
will be replaced with U+FFFD (see url::percent_encoding::lossy_utf8_percent_decode)
NOTE: in future version lossy decoding might be replaced with a more strict decoding
Never relay on the fact thats lossy decoded
impl<R> BodyParser<R> for SerdeBodyParser<R>
Auto Trait Implementations§
impl<R> Freeze for SerdeBodyParser<R>
impl<R> RefUnwindSafe for SerdeBodyParser<R>where
R: RefUnwindSafe,
impl<R> Send for SerdeBodyParser<R>where
R: Send,
impl<R> Sync for SerdeBodyParser<R>where
R: Sync,
impl<R> Unpin for SerdeBodyParser<R>where
R: Unpin,
impl<R> UnwindSafe for SerdeBodyParser<R>where
R: 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
Source§impl<T> PersistentInto<Arc<Mutex<T>>> for T
impl<T> PersistentInto<Arc<Mutex<T>>> for T
Source§fn persistent_into(self) -> Arc<Mutex<T>>
fn persistent_into(self) -> Arc<Mutex<T>>
Convert
self
into a value of type T
.Source§impl<T> PersistentInto<Arc<RwLock<T>>> for T
impl<T> PersistentInto<Arc<RwLock<T>>> for T
Source§fn persistent_into(self) -> Arc<RwLock<T>>
fn persistent_into(self) -> Arc<RwLock<T>>
Convert
self
into a value of type T
.Source§impl<T> PersistentInto<Arc<T>> for T
impl<T> PersistentInto<Arc<T>> for T
Source§fn persistent_into(self) -> Arc<T>
fn persistent_into(self) -> Arc<T>
Convert
self
into a value of type T
.Source§impl<T> PersistentInto<T> for T
impl<T> PersistentInto<T> for T
Source§fn persistent_into(self) -> T
fn persistent_into(self) -> T
Convert
self
into a value of type T
.