[][src]Trait juniper::LookAheadMethods

pub trait LookAheadMethods<S> {
    fn field_name(&self) -> &str;
fn select_child(&self, name: &str) -> Option<&Self>;
fn has_arguments(&self) -> bool;
fn has_children(&self) -> bool;
fn arguments(&self) -> &[LookAheadArgument<S>];
fn child_names(&self) -> Vec<&str>; fn has_child(&self, name: &str) -> bool { ... }
fn argument(&self, name: &str) -> Option<&LookAheadArgument<S>> { ... } }

A set of common methods for ConcreteLookAheadSelection and LookAheadSelection

Required methods

fn field_name(&self) -> &str

Get the name of the field represented by the current selection

fn select_child(&self, name: &str) -> Option<&Self>

Get the the child selection for a given field

fn has_arguments(&self) -> bool

Does the current node have any arguments?

fn has_children(&self) -> bool

Does the current node have any children?

fn arguments(&self) -> &[LookAheadArgument<S>]

Get the top level arguments for the current selection

fn child_names(&self) -> Vec<&str>

Get the top level children for the current selection

Loading content...

Provided methods

fn has_child(&self, name: &str) -> bool

Check if a given field exists

fn argument(&self, name: &str) -> Option<&LookAheadArgument<S>>

Get the top level argument with a given name from the current selection

Loading content...

Implementors

impl<'a, S> LookAheadMethods<S> for LookAheadSelection<'a, S>[src]

Loading content...