[−][src]Struct rweb::Json
Represents request body or response.
If it is in a parameter, content-type should be application/json
and
request body will be deserialized.
If it is in a return type, response will contain a content type header with
value application/json
, and value is serialized.
Methods
impl<T> Json<T>
[src]
pub fn into_inner(self) -> T
[src]
Trait Implementations
impl<T: Clone> Clone for Json<T>
[src]
impl<T: Copy> Copy for Json<T>
[src]
impl<T: Debug> Debug for Json<T>
[src]
impl<'de, T> Deserialize<'de> for Json<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T> Entity for Json<T> where
T: Entity,
[src]
T: Entity,
fn describe() -> Schema
[src]
fn describe_components() -> Components
[src]
impl<T: Eq> Eq for Json<T>
[src]
impl<T> From<T> for Json<T>
[src]
impl<T> FromRequest for Json<T> where
T: 'static + Send + DeserializeOwned,
[src]
T: 'static + Send + DeserializeOwned,
type Filter = BoxedFilter<(Json<T>,)>
Extract should be (Self,),
fn is_body() -> bool
[src]
fn content_type() -> &'static str
[src]
fn new() -> Self::Filter
[src]
fn is_optional() -> bool
[src]
fn is_query() -> bool
[src]
impl<T: Hash> Hash for Json<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Ord> Ord for Json<T>
[src]
fn cmp(&self, other: &Json<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq> PartialEq<Json<T>> for Json<T>
[src]
impl<T: PartialOrd> PartialOrd<Json<T>> for Json<T>
[src]
fn partial_cmp(&self, other: &Json<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Json<T>) -> bool
[src]
fn le(&self, other: &Json<T>) -> bool
[src]
fn gt(&self, other: &Json<T>) -> bool
[src]
fn ge(&self, other: &Json<T>) -> bool
[src]
impl<T> Reply for Json<T> where
T: Serialize + Send,
[src]
T: Serialize + Send,
fn into_response(self) -> Response
[src]
impl<T> ResponseEntity for Json<T> where
T: Entity,
[src]
T: Entity,
fn describe_responses() -> Responses
[src]
impl<T> Serialize for Json<T> where
T: Serialize,
[src]
T: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T> StructuralEq for Json<T>
[src]
impl<T> StructuralPartialEq for Json<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Json<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Json<T> where
T: Send,
T: Send,
impl<T> Sync for Json<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Json<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Json<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,