pub struct Json<T, const LIMIT: usize = DEFAULT_LIMIT>(pub T);Expand description
Extract type for Json object. const generic param LIMIT is for max size of the object in bytes. Object larger than limit would be treated as error.
Default limit is DEFAULT_LIMIT in bytes.
Tuple Fields§
§0: TTrait Implementations§
source§impl<'a, 'r, C, B, T, const LIMIT: usize> FromRequest<'a, WebContext<'r, C, B>> for Json<T, LIMIT>
impl<'a, 'r, C, B, T, const LIMIT: usize> FromRequest<'a, WebContext<'r, C, B>> for Json<T, LIMIT>
source§impl<'r, C, B, T> Responder<WebContext<'r, C, B>> for Json<T>where
T: Serialize,
impl<'r, C, B, T> Responder<WebContext<'r, C, B>> for Json<T>where
T: Serialize,
source§impl<'r, C, B, T> Service<WebContext<'r, C, B>> for Json<T>
impl<'r, C, B, T> Service<WebContext<'r, C, B>> for Json<T>
Auto Trait Implementations§
impl<T, const LIMIT: usize> RefUnwindSafe for Json<T, LIMIT>where
T: RefUnwindSafe,
impl<T, const LIMIT: usize> Send for Json<T, LIMIT>where
T: Send,
impl<T, const LIMIT: usize> Sync for Json<T, LIMIT>where
T: Sync,
impl<T, const LIMIT: usize> Unpin for Json<T, LIMIT>where
T: Unpin,
impl<T, const LIMIT: usize> UnwindSafe for Json<T, LIMIT>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
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<S, Arg> ServiceExt<Arg> for Swhere
S: Service<Arg>,
impl<S, Arg> ServiceExt<Arg> for Swhere
S: Service<Arg>,
source§fn enclosed<T>(self, build: T) -> Pipeline<Self, T, BuildEnclosed>
fn enclosed<T>(self, build: T) -> Pipeline<Self, T, BuildEnclosed>
Enclose Self with given
T as Service<<Self as Service<_>>::Response>>. In other word T
would take Self’s Service::Response type as it’s generic argument of Service<_> impl.source§fn enclosed_fn<T, Req>(self, func: T) -> Pipeline<Self, T, BuildEnclosedFn>
fn enclosed_fn<T, Req>(self, func: T) -> Pipeline<Self, T, BuildEnclosedFn>
Function version of Self::enclosed method.
source§fn map<F, Res, ResMap>(self, mapper: F) -> Pipeline<Self, F, BuildMap>
fn map<F, Res, ResMap>(self, mapper: F) -> Pipeline<Self, F, BuildMap>
Mutate
<<Self::Response as Service<Req>>::Future as Future>::Output type with given
closure.