Enum juniper::meta::MetaType[][src]

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

Generic type metadata

Implementations

impl<'a, S> MetaType<'a, S>[src]

pub fn name(&self) -> Option<&str>[src]

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]

Access the description of the type, if applicable

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

pub fn type_kind(&self) -> TypeKind[src]

Construct 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<'_, S>>[src]

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<'_, S>>[src]

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]

Construct a Type literal instance based on the metadata

pub fn input_value_parse_fn(
    &self
) -> Option<for<'b> fn(_: &'b InputValue<S>) -> bool>
[src]

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]

Returns true if the type is a composite type

Objects, interfaces, and unions are composite.

pub fn is_leaf(&self) -> bool[src]

Returns 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]

Returns true if the type is abstract

Only interfaces and unions are abstract types.

pub fn is_input(&self) -> bool[src]

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.

pub fn is_builtin(&self) -> bool[src]

Returns true if the type is built-in to GraphQL.

Trait Implementations

impl<'a, S: Debug> Debug for MetaType<'a, S>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a, S> RefUnwindSafe for MetaType<'a, S> where
    S: RefUnwindSafe

impl<'a, S> Send for MetaType<'a, S> where
    S: Send

impl<'a, S> Sync for MetaType<'a, S> where
    S: Sync

impl<'a, S> Unpin for MetaType<'a, S> where
    S: Unpin

impl<'a, S> UnwindSafe for MetaType<'a, S> where
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V