Struct artemis_codegen::GraphQLClientCodegenOptions [−][src]
Used to configure code generation.
Fields
mode: CodegenMode
Which context is this code generation effort taking place.
operation_name: Option<String>
Name of the operation we want to generate code for. If it does not match, we use all queries.
struct_name: Option<String>
The name of implemention target struct.
include_query_info: bool
Include query info? (Needed for things like normalized caching)
wasm_bindgen: bool
Include wasm_bindgen utils? Requires wasm-bindgen and wasm-typescript-definition
Implementations
impl GraphQLClientCodegenOptions
[src]
pub fn new(mode: CodegenMode) -> GraphQLClientCodegenOptions
[src]
Creates an empty options object with default params. It probably wants to be configured.
pub fn set_query_file(&mut self, path: PathBuf)
[src]
A path to a file to include in the module to force Cargo to take into account changes in the query files when recompiling.
pub fn variables_derives(&self) -> Option<&str>
[src]
Comma-separated list of additional traits we want to derive for variables.
pub fn set_variables_derives(&mut self, variables_derives: String)
[src]
Comma-separated list of additional traits we want to derive for variables.
pub fn response_derives(&self) -> Option<&str>
[src]
Comma-separated list of additional traits we want to derive for responses.
pub fn set_response_derives(&mut self, response_derives: String)
[src]
Comma-separated list of additional traits we want to derive for responses.
pub fn set_deprecation_strategy(
&mut self,
deprecation_strategy: DeprecationStrategy
)
[src]
&mut self,
deprecation_strategy: DeprecationStrategy
)
The deprecation strategy to adopt.
pub fn set_module_visibility(&mut self, visibility: Visibility)
[src]
Target module visibility.
pub fn set_struct_name(&mut self, struct_name: String)
[src]
The name of implemention target struct.
pub fn set_operation_name(&mut self, operation_name: String)
[src]
Name of the operation we want to generate code for. If none is selected, it means all operations.
pub fn schema_file(&self) -> Option<&Path>
[src]
A path to a file to include in the module to force Cargo to take into account changes in the schema files when recompiling.
pub fn query_file(&self) -> Option<&Path>
[src]
A path to a file to include in the module to force Cargo to take into account changes in the query files when recompiling.
pub fn set_struct_ident(&mut self, ident: Ident)
[src]
The identifier to use when referring to the struct implementing GraphQLQuery, if any.
pub fn struct_ident(&self) -> Option<&Ident>
[src]
The identifier to use when referring to the struct implementing GraphQLQuery, if any.
pub fn set_normalization(&mut self, norm: Normalization)
[src]
Set the normalization mode for the generated code.
pub fn normalization(&self) -> Normalization
[src]
The normalization mode for the generated code.
Trait Implementations
impl Clone for GraphQLClientCodegenOptions
[src]
fn clone(&self) -> GraphQLClientCodegenOptions
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for GraphQLClientCodegenOptions
impl !Send for GraphQLClientCodegenOptions
impl !Sync for GraphQLClientCodegenOptions
impl Unpin for GraphQLClientCodegenOptions
impl UnwindSafe for GraphQLClientCodegenOptions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,