pub struct GraphQLPropertyInstance {
pub property_type_container: GraphQLPropertyTypeContainer,
pub name: String,
pub value: Value,
}
Fields§
§property_type_container: GraphQLPropertyTypeContainer
§name: String
The name of the property.
value: Value
The value of the property as JSON representation.
Implementations§
Source§impl GraphQLPropertyInstance
impl GraphQLPropertyInstance
pub fn new_entity_property(ty: EntityTypeId, name: String, value: Value) -> Self
pub fn new_relation_property( ty: RelationTypeId, name: String, value: Value, ) -> Self
pub fn to_map( properties: Option<Vec<GraphQLPropertyInstance>>, ) -> HashMap<String, Value>
pub fn to_map_with_defaults( properties: Option<Vec<GraphQLPropertyInstance>>, property_types: PropertyTypes, ) -> HashMap<String, Value>
pub fn to_property_instances_with_defaults( properties: Option<Vec<GraphQLPropertyInstance>>, property_types: PropertyTypes, ) -> PropertyInstances
Trait Implementations§
Source§impl Clone for GraphQLPropertyInstance
impl Clone for GraphQLPropertyInstance
Source§fn clone(&self) -> GraphQLPropertyInstance
fn clone(&self) -> GraphQLPropertyInstance
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ContainerType for GraphQLPropertyInstance
impl ContainerType for GraphQLPropertyInstance
Source§async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
Resolves a field value and outputs it as a json value
async_graphql::Value
. Read moreSource§async fn find_entity(
&self,
ctx: &Context<'_>,
params: &Value,
) -> ServerResult<Option<Value>>
async fn find_entity( &self, ctx: &Context<'_>, params: &Value, ) -> ServerResult<Option<Value>>
Find the GraphQL entity with the given name from the parameter. Read more
Source§impl Debug for GraphQLPropertyInstance
impl Debug for GraphQLPropertyInstance
Source§impl<'de> Deserialize<'de> for GraphQLPropertyInstance
impl<'de> Deserialize<'de> for GraphQLPropertyInstance
Source§fn 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
Source§impl InputType for GraphQLPropertyInstance
impl InputType for GraphQLPropertyInstance
Source§type RawValueType = GraphQLPropertyInstance
type RawValueType = GraphQLPropertyInstance
The raw type used for validator. Read more
Source§fn 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.
Source§fn parse(value: Option<Value>) -> InputValueResult<Self>
fn parse(value: Option<Value>) -> InputValueResult<Self>
Parse from
Value
. None represents undefined.Source§fn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Source§impl OutputType for GraphQLPropertyInstance
impl OutputType for GraphQLPropertyInstance
Source§fn 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.
Source§async fn resolve(
&self,
ctx: &ContextSelectionSet<'_>,
_field: &Positioned<Field>,
) -> ServerResult<Value>
async fn resolve( &self, ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>
Resolve an output value to
async_graphql::Value
.§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
§fn introspection_type_name(&self) -> Cow<'static, str>
fn introspection_type_name(&self) -> Cow<'static, str>
Introspection type name Read more
Source§impl Serialize for GraphQLPropertyInstance
impl Serialize for GraphQLPropertyInstance
impl InputObjectType for GraphQLPropertyInstance
impl ObjectType for GraphQLPropertyInstance
Auto Trait Implementations§
impl Freeze for GraphQLPropertyInstance
impl RefUnwindSafe for GraphQLPropertyInstance
impl Send for GraphQLPropertyInstance
impl Sync for GraphQLPropertyInstance
impl Unpin for GraphQLPropertyInstance
impl UnwindSafe for GraphQLPropertyInstance
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more