[][src]Struct graphql_client_codegen::GraphQLClientCodegenOptions

pub struct GraphQLClientCodegenOptions {
    pub mode: CodegenMode,
    pub operation_name: Option<String>,
    pub struct_name: Option<String>,
    // some fields omitted
}

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.

Methods

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 additional_derives(&self) -> Option<&str>[src]

Comma-separated list of additional traits we want to derive.

pub fn set_additional_derives(&mut self, additional_derives: String)[src]

Comma-separated list of additional traits we want to derive.

pub fn set_deprecation_strategy(
    &mut self,
    deprecation_strategy: DeprecationStrategy
)
[src]

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.

Trait Implementations

impl Debug for GraphQLClientCodegenOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.