Struct async_graphql::context::SelectionField
source · pub struct SelectionField<'a> { /* private fields */ }
Expand description
Selection field.
Implementations§
source§impl<'a> SelectionField<'a>
impl<'a> SelectionField<'a>
sourcepub fn name(&self) -> &'a str
pub fn name(&self) -> &'a str
Get the name of this field.
Examples found in repository?
src/context.rs (line 804)
795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
struct DebugSelectionSet<'a>(Vec<SelectionField<'a>>);
impl<'a> Debug for DebugSelectionSet<'a> {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.debug_list().entries(&self.0).finish()
}
}
f.debug_struct(self.name())
.field("name", &self.name())
.field(
"selection_set",
&DebugSelectionSet(self.selection_set().collect()),
)
.finish()
}
sourcepub fn selection_set(&self) -> impl Iterator<Item = SelectionField<'a>>
pub fn selection_set(&self) -> impl Iterator<Item = SelectionField<'a>>
Get all subfields of the current selection set.
Examples found in repository?
src/context.rs (line 808)
795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
struct DebugSelectionSet<'a>(Vec<SelectionField<'a>>);
impl<'a> Debug for DebugSelectionSet<'a> {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.debug_list().entries(&self.0).finish()
}
}
f.debug_struct(self.name())
.field("name", &self.name())
.field(
"selection_set",
&DebugSelectionSet(self.selection_set().collect()),
)
.finish()
}
Trait Implementations§
source§impl<'a> Clone for SelectionField<'a>
impl<'a> Clone for SelectionField<'a>
source§fn clone(&self) -> SelectionField<'a>
fn clone(&self) -> SelectionField<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for SelectionField<'a>
impl<'a> Debug for SelectionField<'a>
source§impl<'a> From<SelectionField<'a>> for Lookahead<'a>
impl<'a> From<SelectionField<'a>> for Lookahead<'a>
source§fn from(selection_field: SelectionField<'a>) -> Self
fn from(selection_field: SelectionField<'a>) -> Self
Converts to this type from the input type.