Struct async_graphql::types::Json  
source · [−]pub struct Json<T>(pub T);Expand description
A scalar that can represent any JSON value.
If the inner type cannot be serialized as JSON (e.g. it has non-string keys)
it will be null.
Tuple Fields
0: TTrait Implementations
sourceimpl<'de, T> Deserialize<'de> for Json<T> where
    T: Deserialize<'de>, 
 
impl<'de, T> Deserialize<'de> for Json<T> where
    T: Deserialize<'de>, 
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T: DeserializeOwned + Serialize + Send + Sync> InputType for Json<T>
 
impl<T: DeserializeOwned + Serialize + Send + Sync> InputType for Json<T>
type RawValueType = T
type RawValueType = T
The raw type used for validator. Read more
sourcefn create_type_info(registry: &mut Registry) -> String
 
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
sourcefn parse(value: Option<Value>) -> InputValueResult<Self>
 
fn parse(value: Option<Value>) -> InputValueResult<Self>
Parse from Value. None represents undefined.
sourcefn as_raw_value(&self) -> Option<&Self::RawValueType>
 
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
sourcefn qualified_type_name() -> String
 
fn qualified_type_name() -> String
Qualified typename.
sourceimpl<T: Serialize + Send + Sync> OutputType for Json<T>
 
impl<T: Serialize + Send + Sync> OutputType for Json<T>
sourcefn create_type_info(registry: &mut Registry) -> String
 
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
sourcefn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self, 
    _ctx: &'life1 ContextSelectionSet<'life2>, 
    _field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
 
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self, 
    _ctx: &'life1 ContextSelectionSet<'life2>, 
    _field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
Resolve an output value to async_graphql::Value.
sourcefn qualified_type_name() -> String
 
fn qualified_type_name() -> String
Qualified typename.
sourcefn introspection_type_name(&self) -> Cow<'static, str>
 
fn introspection_type_name(&self) -> Cow<'static, str>
Introspection type name Read more
impl<T: Eq> Eq for Json<T>
impl<T> StructuralEq for Json<T>
impl<T> StructuralPartialEq for Json<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Json<T> where
    T: RefUnwindSafe, 
impl<T> Send for Json<T> where
    T: Send, 
impl<T> Sync for Json<T> where
    T: Sync, 
impl<T> Unpin for Json<T> where
    T: Unpin, 
impl<T> UnwindSafe for Json<T> where
    T: UnwindSafe, 
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    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 Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized, 
 
impl<Q, K> Equivalent<K> for Q where
    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.
sourceimpl<T> FutureExt for T
 
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
 
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
 
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
 
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
 
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
 
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
 
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
 
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
 
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourceimpl<T> WithSubscriber for T
 
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
 
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
 
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more