pub struct IntermediateUnion {
pub name: String,
pub member_types: Vec<String>,
pub description: Option<String>,
}Expand description
GraphQL union type definition in intermediate format.
Unions represent a type that could be one of several object types. Per GraphQL spec §3.10, unions are abstract types with member types. Unlike interfaces, unions don’t define common fields.
§Example JSON
{
"name": "SearchResult",
"member_types": ["User", "Post", "Comment"],
"description": "A result from a search query"
}Fields§
§name: StringUnion type name (e.g., “SearchResult”)
member_types: Vec<String>Member types (object type names that belong to this union)
description: Option<String>Union description (from docstring)
Trait Implementations§
Source§impl Clone for IntermediateUnion
impl Clone for IntermediateUnion
Source§fn clone(&self) -> IntermediateUnion
fn clone(&self) -> IntermediateUnion
Returns a duplicate 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 Debug for IntermediateUnion
impl Debug for IntermediateUnion
Source§impl<'de> Deserialize<'de> for IntermediateUnion
impl<'de> Deserialize<'de> for IntermediateUnion
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 PartialEq for IntermediateUnion
impl PartialEq for IntermediateUnion
Source§impl Serialize for IntermediateUnion
impl Serialize for IntermediateUnion
impl Eq for IntermediateUnion
impl StructuralPartialEq for IntermediateUnion
Auto Trait Implementations§
impl Freeze for IntermediateUnion
impl RefUnwindSafe for IntermediateUnion
impl Send for IntermediateUnion
impl Sync for IntermediateUnion
impl Unpin for IntermediateUnion
impl UnwindSafe for IntermediateUnion
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.