Skip to main content

Document

Type Alias Document 

Source
pub type Document = Document<'static, String>;

Aliased Type§

pub struct Document {
    pub definitions: Vec<Definition<'static, String>>,
}

Fields§

§definitions: Vec<Definition<'static, String>>

Implementations§

Source§

impl Document

Source

pub fn type_by_name(&self, name: &str) -> Option<&TypeDefinition>

Source

pub fn directive_by_name(&self, name: &str) -> Option<&DirectiveDefinition>

Source

pub fn query_type(&self) -> &ObjectType

Source

pub fn mutation_type(&self) -> Option<&ObjectType>

Source

pub fn subscription_type(&self) -> Option<&ObjectType>

Source

pub fn type_map(&self) -> HashMap<&str, &TypeDefinition>

Source

pub fn is_named_subtype( &self, sub_type_name: &str, super_type_name: &str, ) -> bool

Source

pub fn is_subtype(&self, sub_type: &Type, super_type: &Type) -> bool

Source

pub fn query_type_name(&self) -> &str

Source

pub fn mutation_type_name(&self) -> Option<&str>

Source

pub fn subscription_type_name(&self) -> Option<&str>

Trait Implementations§

Source§

impl Hash for Document

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more