--- source: cynic-codegen/tests/use-schema.rs expression: "format_code(format!(\"{}\", tokens))" --- impl cynic::schema::QueryRoot for Query {} pub struct AnInputType; impl cynic::schema::InputObjectMarker for AnInputType {} pub struct Dessert {} pub struct JSON {} impl cynic::schema::NamedType for JSON { const NAME: &'static str = "JSON"; } pub struct MyUnionType {} pub struct Nested; pub struct Query; pub struct TestStruct; impl cynic::schema::HasSubtype for MyUnionType {} impl cynic::schema::HasSubtype for MyUnionType {} impl cynic::schema::NamedType for MyUnionType { const NAME: &'static str = "MyUnionType"; } impl cynic::schema::NamedType for Nested { const NAME: &'static str = "Nested"; } impl cynic::schema::NamedType for Query { const NAME: &'static str = "Query"; } impl cynic::schema::NamedType for TestStruct { const NAME: &'static str = "TestStruct"; } #[allow(non_snake_case, non_camel_case_types)] pub mod __fields { pub mod AnInputType { pub struct favouriteDessert; impl cynic::schema::Field for favouriteDessert { type Type = Option; const NAME: &'static str = "favouriteDessert"; } impl cynic::schema::HasInputField> for super::super::AnInputType { } } pub mod Nested { pub struct aString; impl cynic::schema::Field for aString { type Type = super::super::String; const NAME: &'static str = "aString"; } impl cynic::schema::HasField for super::super::Nested { type Type = super::super::String; } pub struct optString; impl cynic::schema::Field for optString { type Type = Option; const NAME: &'static str = "optString"; } impl cynic::schema::HasField for super::super::Nested { 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::Nested { type Type = super::super::String; } } pub mod Query { pub struct testStruct; impl cynic::schema::Field for testStruct { type Type = Option; const NAME: &'static str = "testStruct"; } impl cynic::schema::HasField for super::super::Query { type Type = Option; } pub struct myUnion; impl cynic::schema::Field for myUnion { type Type = Option; const NAME: &'static str = "myUnion"; } impl cynic::schema::HasField for super::super::Query { 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::Query { type Type = super::super::String; } } pub mod TestStruct { pub struct fieldOne; impl cynic::schema::Field for fieldOne { type Type = super::super::String; const NAME: &'static str = "fieldOne"; } impl cynic::schema::HasField for super::super::TestStruct { type Type = super::super::String; } pub mod _field_one_arguments { pub struct x; impl cynic::schema::HasArgument for super::fieldOne { type ArgumentType = Option; const NAME: &'static str = "x"; } pub struct y; impl cynic::schema::HasArgument for super::fieldOne { type ArgumentType = Option; const NAME: &'static str = "y"; } } pub struct tastyCakes; impl cynic::schema::Field for tastyCakes { type Type = super::super::Dessert; const NAME: &'static str = "tastyCakes"; } impl cynic::schema::HasField for super::super::TestStruct { type Type = super::super::Dessert; } pub mod _tasty_cakes_arguments { pub struct first; impl cynic::schema::HasArgument for super::tastyCakes { type ArgumentType = super::super::super::Dessert; const NAME: &'static str = "first"; } pub struct second; impl cynic::schema::HasArgument for super::tastyCakes { type ArgumentType = Option; const NAME: &'static str = "second"; } } pub struct fieldWithInput; impl cynic::schema::Field for fieldWithInput { type Type = super::super::Dessert; const NAME: &'static str = "fieldWithInput"; } impl cynic::schema::HasField for super::super::TestStruct { type Type = super::super::Dessert; } pub mod _field_with_input_arguments { pub struct input; impl cynic::schema::HasArgument for super::fieldWithInput { type ArgumentType = super::super::super::AnInputType; const NAME: &'static str = "input"; } } pub struct nested; impl cynic::schema::Field for nested { type Type = super::super::Nested; const NAME: &'static str = "nested"; } impl cynic::schema::HasField for super::super::TestStruct { type Type = super::super::Nested; } pub struct optNested; impl cynic::schema::Field for optNested { type Type = Option; const NAME: &'static str = "optNested"; } impl cynic::schema::HasField for super::super::TestStruct { type Type = Option; } pub struct dessert; impl cynic::schema::Field for dessert { type Type = Option; const NAME: &'static str = "dessert"; } impl cynic::schema::HasField for super::super::TestStruct { type Type = Option; } pub struct json; impl cynic::schema::Field for json { type Type = Option; const NAME: &'static str = "json"; } impl cynic::schema::HasField for super::super::TestStruct { 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::TestStruct { type Type = super::super::String; } } } 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"); } }