pub trait InputType:Send +Sync +Sized { typeRawValueType: ?Sized; // Required methods fntype_name() ->Cow<'static,str>; fncreate_type_info(registry: &mut Registry) ->String; fnparse(value:Option<Value>) ->InputValueResult<Self>; fnto_value(&self) ->Value; fnas_raw_value(&self) ->Option<&Self::RawValueType>; // Provided method fnqualified_type_name() ->String { ... }}
Expand description
Represents a GraphQL input type.
Required Associated Types§
SourcetypeRawValueType: ?Sized
typeRawValueType: ?Sized
The raw type used for validator.
Usually it isSelf
, but the wrapper type is its internal type.
For example:
i32::RawValueType
isi32
Option<i32>::RawValueType
isi32
.
Required Methods§
Sourcefncreate_type_info(registry: &mut Registry) ->String
fncreate_type_info(registry: &mut Registry) ->String
Create type information in the registry and return qualified typename.
Sourcefnparse(value:Option<Value>) ->InputValueResult<Self>
fnparse(value:Option<Value>) ->InputValueResult<Self>
Parse fromValue
. None represents undefined.
Sourcefnas_raw_value(&self) ->Option<&Self::RawValueType>
fnas_raw_value(&self) ->Option<&Self::RawValueType>
Returns a reference to the raw value.
Provided Methods§
Sourcefnqualified_type_name() ->String
fnqualified_type_name() ->String
Qualified typename.
Dyn Compatibility§
This trait isnotdyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.