cynic_parser::executable::writer

Struct ExecutableAstWriter

Source
pub struct ExecutableAstWriter {
    pub values: ValueWriter,
    /* private fields */
}

Fields§

§values: ValueWriter

Implementations§

Source§

impl ExecutableAstWriter

Source

pub fn new() -> Self

Source

pub fn finish(self) -> ExecutableDocument

Source

pub fn operation_definition( &mut self, definition: OperationDefinitionRecord, ) -> ExecutableDefinitionId

Source

pub fn fragment_definition( &mut self, definition: FragmentDefinitionRecord, ) -> ExecutableDefinitionId

Source

pub fn variable_definition( &mut self, record: VariableDefinitionRecord, ) -> VariableDefinitionId

Source

pub fn variable_definition_range( &mut self, expected_count: Option<usize>, ) -> IdRange<VariableDefinitionId>

Source

pub fn type_reference(&mut self, ty: TypeRecord) -> TypeId

Source

pub fn selection_set( &mut self, selection_set: Vec<SelectionRecord>, ) -> IdRange<SelectionId>

Source

pub fn field_selection( &mut self, record: FieldSelectionRecord, ) -> FieldSelectionId

Source

pub fn fragment_spread( &mut self, record: FragmentSpreadRecord, ) -> FragmentSpreadId

Source

pub fn inline_fragment( &mut self, record: InlineFragmentRecord, ) -> InlineFragmentId

Source

pub fn arguments(&mut self, records: Vec<ArgumentRecord>) -> IdRange<ArgumentId>

Source

pub fn directive(&mut self, directive: DirectiveRecord) -> DirectiveId

Source

pub fn directive_range( &mut self, expected_count: Option<usize>, ) -> IdRange<DirectiveId>

Source

pub fn block_string(&mut self, string: &str) -> BlockStringLiteralId

Source

pub fn ident(&mut self, ident: &str) -> StringId

Source

pub fn intern_string(&mut self, string: &str) -> StringId

Source

pub fn intern_owned_string(&mut self, string: String) -> StringId

Trait Implementations§

Source§

impl Default for ExecutableAstWriter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.