Enum juniper::meta::MetaType

source ·
pub enum MetaType<'a, S = DefaultScalarValue> {
    // some variants omitted
}
Expand description

Generic type metadata

Implementations

Access the name of the type, if applicable

Lists, non-null wrappers, and placeholders don’t have names.

Access the description of the type, if applicable

Lists, nullable wrappers, and placeholders don’t have names.

Construct a TypeKind for a given type

Panics

Panics if the type represents a placeholder or nullable type.

Access a field’s meta data given its name

Only objects and interfaces have fields. This method always returns None for other types.

Access an input field’s meta data given its name

Only input objects have input fields. This method always returns None for other types.

Construct a Type literal instance based on the metadata

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.

Returns true if the type is a composite type

Objects, interfaces, and unions are composite.

Returns true if the type can occur in leaf positions in queries

Only enums and scalars are leaf types.

Returns true if the type is abstract

Only interfaces and unions are abstract types.

Returns true if the type can be used in input positions, e.g. arguments or variables

Only scalars, enums, and input objects are input types.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.