[][src]Trait juniper::LookAheadMethods

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

Set of common methods for ConcreteLookAheadSelection and LookAheadSelection.

'sel lifetime is intended to point to the data that this LookAheadSelection (or ConcreteLookAheadSelection) points to.

Required methods

pub fn field_name(&self) -> &'sel str[src]

Get the (potentially aliased) name of the field represented by the current selection

pub fn select_child(&self, name: &str) -> Option<&Self>[src]

👎 Deprecated:

please use children to access the child selections instead

Get the the child selection for a given field If a child has an alias, it will only match if the alias matches name

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

Does the current node have any arguments?

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

Does the current node have any children?

pub fn arguments(&self) -> &[LookAheadArgument<'_, S>][src]

Get the top level arguments for the current selection

pub fn child_names(&self) -> Vec<&'sel str>[src]

👎 Deprecated:

please use children to access the child selections instead

Get the (possibly aliased) names of the top level children for the current selection

pub fn children(&self) -> Vec<&Self>[src]

Get an iterator over the children for the current selection

Loading content...

Provided methods

pub fn has_child(&self, name: &str) -> bool[src]

👎 Deprecated:

please use children to access the child selections instead

Check if a given child selection with a name exists If a child has an alias, it will only match if the alias matches name

pub fn argument(&self, name: &str) -> Option<&LookAheadArgument<'_, S>>[src]

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

Loading content...

Implementors

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

Loading content...