cynic_parser::type_system::writer

Struct TypeSystemAstWriter

Source
pub struct TypeSystemAstWriter { /* private fields */ }

Implementations§

Source§

impl TypeSystemAstWriter

Source

pub fn new() -> Self

Source

pub fn update(ast: TypeSystemDocument) -> Self

Source

pub fn finish(self) -> TypeSystemDocument

Source

pub fn store_description( &mut self, definition: DefinitionId, description: Option<DescriptionId>, )

Source

pub fn description(&mut self, description: DescriptionRecord) -> DescriptionId

Source

pub fn schema_definition( &mut self, definition: SchemaDefinitionRecord, ) -> DefinitionId

Source

pub fn root_operation_definitions( &mut self, definitions: Vec<RootOperationTypeDefinitionRecord>, ) -> IdRange<RootOperationTypeDefinitionId>

Source

pub fn scalar_definition( &mut self, definition: ScalarDefinitionRecord, ) -> DefinitionId

Source

pub fn object_definition( &mut self, definition: ObjectDefinitionRecord, ) -> DefinitionId

Source

pub fn field_definition( &mut self, definition: FieldDefinitionRecord, ) -> FieldDefinitionId

Source

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

Source

pub fn interface_definition( &mut self, definition: InterfaceDefinitionRecord, ) -> DefinitionId

Source

pub fn union_definition( &mut self, definition: UnionDefinitionRecord, ) -> DefinitionId

Source

pub fn enum_definition( &mut self, definition: EnumDefinitionRecord, ) -> DefinitionId

Source

pub fn enum_value_definition( &mut self, definition: EnumValueDefinitionRecord, ) -> EnumValueDefinitionId

Source

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

Source

pub fn input_object_definition( &mut self, definition: InputObjectDefinitionRecord, ) -> DefinitionId

Source

pub fn input_value_definition( &mut self, definition: InputValueDefinitionRecord, ) -> InputValueDefinitionId

Source

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

Source

pub fn schema_extension( &mut self, definition: SchemaDefinitionRecord, ) -> DefinitionId

Source

pub fn scalar_extension( &mut self, definition: ScalarDefinitionRecord, ) -> DefinitionId

Source

pub fn object_extension( &mut self, definition: ObjectDefinitionRecord, ) -> DefinitionId

Source

pub fn interface_extension( &mut self, definition: InterfaceDefinitionRecord, ) -> DefinitionId

Source

pub fn union_member(&mut self, member: UnionMemberRecord) -> UnionMemberId

Source

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

Source

pub fn union_extension( &mut self, definition: UnionDefinitionRecord, ) -> DefinitionId

Source

pub fn enum_extension( &mut self, definition: EnumDefinitionRecord, ) -> DefinitionId

Source

pub fn input_object_extension( &mut self, definition: InputObjectDefinitionRecord, ) -> DefinitionId

Source

pub fn directive_definition( &mut self, definition: DirectiveDefinitionRecord, ) -> DefinitionId

Source

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

Source

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

Source

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

Source

pub fn argument(&mut self, argument: ArgumentRecord) -> ArgumentId

Source

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

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 TypeSystemAstWriter

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.