Struct cynic::OperationBuilder
source · pub struct OperationBuilder<QueryFragment, Variables = ()> { /* private fields */ }
Expand description
Low level builder for Operation.
Users should prefer to use crate::QueryBuilder, crate::MutationBuilder or crate::SubscriptionBuilder where possible, unless they need the control offered by this builder.
Implementations§
source§impl<Fragment, Variables> OperationBuilder<Fragment, Variables>where
Fragment: QueryFragment,
Variables: QueryVariables,
impl<Fragment, Variables> OperationBuilder<Fragment, Variables>where
Fragment: QueryFragment,
Variables: QueryVariables,
sourcepub fn query() -> Selfwhere
Fragment::SchemaType: QueryRoot,
pub fn query() -> Selfwhere
Fragment::SchemaType: QueryRoot,
Creates an OperationBuilder
for a query operation
sourcepub fn mutation() -> Selfwhere
Fragment::SchemaType: MutationRoot,
pub fn mutation() -> Selfwhere
Fragment::SchemaType: MutationRoot,
Creates an OperationBuilder
for a mutation operation
sourcepub fn subscription() -> Selfwhere
Fragment::SchemaType: SubscriptionRoot,
pub fn subscription() -> Selfwhere
Fragment::SchemaType: SubscriptionRoot,
Creates an OperationBuilder
for a subscription operation
sourcepub fn with_variables(self, variables: Variables) -> Self
pub fn with_variables(self, variables: Variables) -> Self
Adds variables for the operation
sourcepub fn set_variables(&mut self, variables: Variables)
pub fn set_variables(&mut self, variables: Variables)
Sets variables for the operation
sourcepub fn with_feature_enabled(self, feature: &str) -> Self
pub fn with_feature_enabled(self, feature: &str) -> Self
Enables a feature for the operation
sourcepub fn enable_feature(&mut self, feature: &str)
pub fn enable_feature(&mut self, feature: &str)
Sets an enabled feature for the operation
sourcepub fn with_operation_name(self, name: &str) -> Self
pub fn with_operation_name(self, name: &str) -> Self
Adds a name to the operation
sourcepub fn set_operation_name(&mut self, name: &str)
pub fn set_operation_name(&mut self, name: &str)
Sets a name for the operation
Auto Trait Implementations§
impl<QueryFragment, Variables> RefUnwindSafe for OperationBuilder<QueryFragment, Variables>where
Variables: RefUnwindSafe,
impl<QueryFragment, Variables> Send for OperationBuilder<QueryFragment, Variables>where
Variables: Send,
impl<QueryFragment, Variables> Sync for OperationBuilder<QueryFragment, Variables>where
Variables: Sync,
impl<QueryFragment, Variables> Unpin for OperationBuilder<QueryFragment, Variables>where
Variables: Unpin,
impl<QueryFragment, Variables> UnwindSafe for OperationBuilder<QueryFragment, Variables>where
Variables: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more