pub struct JsonField<T>(pub T);
Expand description
A JSON type for multipart field.
Tuple Fields
0: T
Trait Implementations
sourceimpl<T: ParseFromJSON> ParseFromMultipartField for JsonField<T>
impl<T: ParseFromJSON> ParseFromMultipartField for JsonField<T>
sourcefn parse_from_multipart<'async_trait>(
field: Option<PoemField>
) -> Pin<Box<dyn Future<Output = ParseResult<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
fn parse_from_multipart<'async_trait>(
field: Option<PoemField>
) -> Pin<Box<dyn Future<Output = ParseResult<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
Parse from multipart field.
sourcefn parse_from_repeated_field<'async_trait>(
self,
_field: PoemField
) -> Pin<Box<dyn Future<Output = ParseResult<Self>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
fn parse_from_repeated_field<'async_trait>(
self,
_field: PoemField
) -> Pin<Box<dyn Future<Output = ParseResult<Self>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
Parse from repeated multipart field.
sourceimpl<T: PartialEq> PartialEq<JsonField<T>> for JsonField<T>
impl<T: PartialEq> PartialEq<JsonField<T>> for JsonField<T>
sourceimpl<T: Type> Type for JsonField<T>
impl<T: Type> Type for JsonField<T>
sourceconst IS_REQUIRED: bool = true
const IS_REQUIRED: bool = true
If it is
true
, it means that this type is required.type RawValueType = <T as Type>::RawValueType
type RawValueType = <T as Type>::RawValueType
The raw type used for validator. Read more
type RawElementValueType = <T as Type>::RawElementValueType
type RawElementValueType = <T as Type>::RawElementValueType
The raw element type used for validator.
sourcefn schema_ref() -> MetaSchemaRef
fn schema_ref() -> MetaSchemaRef
Get schema reference of this type.
sourcefn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
sourcefn raw_element_iter<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Self::RawElementValueType> + 'a>
fn raw_element_iter<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Self::RawElementValueType> + 'a>
Returns an iterator for traversing the elements.
impl<T: Eq> Eq for JsonField<T>
impl<T> StructuralEq for JsonField<T>
impl<T> StructuralPartialEq for JsonField<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for JsonField<T>where
T: RefUnwindSafe,
impl<T> Send for JsonField<T>where
T: Send,
impl<T> Sync for JsonField<T>where
T: Sync,
impl<T> Unpin for JsonField<T>where
T: Unpin,
impl<T> UnwindSafe for JsonField<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.