Enum juniper::meta::MetaType [−][src]
pub enum MetaType<'a> {
// some variants omitted
}Generic type metadata
Methods
impl<'a> MetaType<'a>[src]
impl<'a> MetaType<'a>pub fn name(&self) -> Option<&str>[src]
pub fn name(&self) -> Option<&str>Access the name of the type, if applicable
Lists, non-null wrappers, and placeholders don't have names.
pub fn description(&self) -> Option<&String>[src]
pub fn description(&self) -> Option<&String>Access the description of the type, if applicable
Lists, nullable wrappers, and placeholders don't have names.
pub fn type_kind(&self) -> TypeKind[src]
pub fn type_kind(&self) -> TypeKindConstruct a TypeKind for a given type
Panics
Panics if the type represents a placeholder or nullable type.
pub fn field_by_name(&self, name: &str) -> Option<&Field>[src]
pub fn field_by_name(&self, name: &str) -> Option<&Field>Access a field's meta data given its name
Only objects and interfaces have fields. This method always returns None for other types.
pub fn input_field_by_name(&self, name: &str) -> Option<&Argument>[src]
pub fn input_field_by_name(&self, name: &str) -> Option<&Argument>Access an input field's meta data given its name
Only input objects have input fields. This method always returns None for other types.
pub fn as_type(&self) -> Type<'a>[src]
pub fn as_type(&self) -> Type<'a>Construct a Type literal instance based on the metadata
pub fn input_value_parse_fn(
&self
) -> Option<&Box<Fn(&InputValue) -> bool + Send + Sync>>[src]
pub fn input_value_parse_fn(
&self
) -> Option<&Box<Fn(&InputValue) -> bool + Send + Sync>>Access the input value parse function, if applicable
An input value parse function is a function that takes an InputValue instance and returns
true if it can be parsed as the provided type.
Only scalars, enums, and input objects have parse functions.
pub fn is_composite(&self) -> bool[src]
pub fn is_composite(&self) -> boolReturns true if the type is a composite type
Objects, interfaces, and unions are composite.
pub fn is_leaf(&self) -> bool[src]
pub fn is_leaf(&self) -> boolReturns true if the type can occur in leaf positions in queries
Only enums and scalars are leaf types.
pub fn is_abstract(&self) -> bool[src]
pub fn is_abstract(&self) -> boolReturns true if the type is abstract
Only interfaces and unions are abstract types.
pub fn is_input(&self) -> bool[src]
pub fn is_input(&self) -> boolReturns true if the type can be used in input positions, e.g. arguments or variables
Only scalars, enums, and input objects are input types.