--- source: cynic-codegen/tests/use-schema.rs expression: "format_code(format!(\"{}\", tokens))" --- impl cynic::schema::QueryRoot for Foo {} pub struct Bar; pub struct FlattenableEnums; pub struct Foo; pub struct RecursiveInputChild; impl cynic::schema::InputObjectMarker for RecursiveInputChild {} pub struct RecursiveInputParent; impl cynic::schema::InputObjectMarker for RecursiveInputParent {} pub struct SelfRecursiveInput; impl cynic::schema::InputObjectMarker for SelfRecursiveInput {} pub struct States {} pub struct UUID {} impl cynic::schema::NamedType for UUID { const NAME: &'static str = "UUID"; } impl cynic::schema::NamedType for Bar { const NAME: &'static str = "Bar"; } impl cynic::schema::NamedType for FlattenableEnums { const NAME: &'static str = "FlattenableEnums"; } impl cynic::schema::NamedType for Foo { const NAME: &'static str = "Foo"; } #[allow(non_snake_case, non_camel_case_types)] pub mod __fields { pub mod Bar { pub struct id; impl cynic::schema::Field for id { type Type = super::super::UUID; const NAME: &'static str = "id"; } impl cynic::schema::HasField for super::super::Bar { type Type = super::super::UUID; } pub struct name; impl cynic::schema::Field for name { type Type = Option; const NAME: &'static str = "name"; } impl cynic::schema::HasField for super::super::Bar { type Type = Option; } pub struct __typename; impl cynic::schema::Field for __typename { type Type = super::super::String; const NAME: &'static str = "__typename"; } impl cynic::schema::HasField<__typename> for super::super::Bar { type Type = super::super::String; } } pub mod FlattenableEnums { pub struct states; impl cynic::schema::Field for states { type Type = Option>>; const NAME: &'static str = "states"; } impl cynic::schema::HasField for super::super::FlattenableEnums { type Type = Option>>; } pub struct __typename; impl cynic::schema::Field for __typename { type Type = super::super::String; const NAME: &'static str = "__typename"; } impl cynic::schema::HasField<__typename> for super::super::FlattenableEnums { type Type = super::super::String; } } pub mod Foo { pub struct _Underscore; impl cynic::schema::Field for _Underscore { type Type = Option; const NAME: &'static str = "_"; } impl cynic::schema::HasField<_Underscore> for super::super::Foo { type Type = Option; } pub struct self_; impl cynic::schema::Field for self_ { type Type = Option; const NAME: &'static str = "self"; } impl cynic::schema::HasField for super::super::Foo { type Type = Option; } pub struct super_; impl cynic::schema::Field for super_ { type Type = Option; const NAME: &'static str = "super"; } impl cynic::schema::HasField for super::super::Foo { type Type = Option; } pub struct crate_; impl cynic::schema::Field for crate_ { type Type = Option; const NAME: &'static str = "crate"; } impl cynic::schema::HasField for super::super::Foo { type Type = Option; } pub struct r#async; impl cynic::schema::Field for r#async { type Type = Option; const NAME: &'static str = "async"; } impl cynic::schema::HasField for super::super::Foo { type Type = Option; } pub struct bar; impl cynic::schema::Field for bar { type Type = Option; const NAME: &'static str = "bar"; } impl cynic::schema::HasField for super::super::Foo { type Type = Option; } pub mod _bar_arguments { pub struct id; impl cynic::schema::HasArgument for super::bar { type ArgumentType = super::super::super::UUID; const NAME: &'static str = "id"; } } pub struct fieldWithKeywordArg; impl cynic::schema::Field for fieldWithKeywordArg { type Type = Vec; const NAME: &'static str = "fieldWithKeywordArg"; } impl cynic::schema::HasField for super::super::Foo { type Type = Vec; } pub mod _field_with_keyword_arg_arguments { pub struct r#where; impl cynic::schema::HasArgument for super::fieldWithKeywordArg { type ArgumentType = Option; const NAME: &'static str = "where"; } } pub struct recursiveInputField; impl cynic::schema::Field for recursiveInputField { type Type = Option; const NAME: &'static str = "recursiveInputField"; } impl cynic::schema::HasField for super::super::Foo { type Type = Option; } pub mod _recursive_input_field_arguments { pub struct recursive; impl cynic::schema::HasArgument for super::recursiveInputField { type ArgumentType = Option; const NAME: &'static str = "recursive"; } pub struct recursive2; impl cynic::schema::HasArgument for super::recursiveInputField { type ArgumentType = Option; const NAME: &'static str = "recursive2"; } } pub struct fieldWithStringArg; impl cynic::schema::Field for fieldWithStringArg { type Type = Option; const NAME: &'static str = "fieldWithStringArg"; } impl cynic::schema::HasField for super::super::Foo { type Type = Option; } pub mod _field_with_string_arg_arguments { pub struct input; impl cynic::schema::HasArgument for super::fieldWithStringArg { type ArgumentType = super::super::super::String; const NAME: &'static str = "input"; } } pub struct __typename; impl cynic::schema::Field for __typename { type Type = super::super::String; const NAME: &'static str = "__typename"; } impl cynic::schema::HasField<__typename> for super::super::Foo { type Type = super::super::String; } } pub mod RecursiveInputChild { pub struct recurse; impl cynic::schema::Field for recurse { type Type = Option; const NAME: &'static str = "recurse"; } impl cynic::schema::HasInputField> for super::super::RecursiveInputChild { } } pub mod RecursiveInputParent { pub struct recurse; impl cynic::schema::Field for recurse { type Type = Option; const NAME: &'static str = "recurse"; } impl cynic::schema::HasInputField> for super::super::RecursiveInputParent { } } pub mod SelfRecursiveInput { pub struct recurse; impl cynic::schema::Field for recurse { type Type = Option; const NAME: &'static str = "recurse"; } impl cynic::schema::HasInputField> for super::super::SelfRecursiveInput { } } } pub type Boolean = bool; pub type String = std::string::String; pub type Float = f64; pub type Int = i32; pub type ID = cynic::Id; pub mod variable { use cynic::variables::VariableType; #[doc = r" Used to determine the type of a given variable that"] #[doc = r" appears in an argument struct."] pub trait Variable { const TYPE: VariableType; } impl Variable for &T where T: ?::core::marker::Sized + Variable, { const TYPE: VariableType = T::TYPE; } impl Variable for Option where T: Variable, { const TYPE: VariableType = VariableType::Nullable(&T::TYPE); } impl Variable for [T] where T: Variable, { const TYPE: VariableType = VariableType::List(&T::TYPE); } impl Variable for Vec where T: Variable, { const TYPE: VariableType = VariableType::List(&T::TYPE); } impl Variable for Box where T: Variable, { const TYPE: VariableType = T::TYPE; } impl Variable for std::rc::Rc where T: Variable, { const TYPE: VariableType = T::TYPE; } impl Variable for std::sync::Arc where T: Variable, { const TYPE: VariableType = T::TYPE; } impl Variable for std::borrow::Cow<'_, T> where T: ?::core::marker::Sized + Variable + ToOwned, { const TYPE: VariableType = T::TYPE; } impl Variable for bool { const TYPE: VariableType = VariableType::Named("Boolean"); } impl Variable for str { const TYPE: VariableType = VariableType::Named("String"); } impl Variable for String { const TYPE: VariableType = ::TYPE; } impl Variable for f64 { const TYPE: VariableType = VariableType::Named("Float"); } impl Variable for i32 { const TYPE: VariableType = VariableType::Named("Int"); } impl Variable for cynic::Id { const TYPE: VariableType = VariableType::Named("ID"); } }