pub struct ExecutableDocument<'schema: 'fragreg, 'fragreg> { /* private fields */ }Expand description
Represents a GraphQL “exectuable document”. As described in the GraphQL spec:
Documents are only executable by a GraphQL service if they areExecutableDocumentand contain at least oneOperationDefinition. ADocumentwhich containsTypeSystemDefinitionOrExtensionmust not be executed; GraphQL execution services which receive aDocumentcontaining these should return a descriptive error.
Generally you’ll only want to work with ExecutableDocuments
only when you’re working with a file that groups multiple operations and/or
fragments in one place. If you’re only working with a single Operation
or Fragment at a time, though,
you’re better off working more directly with those types.
Implementations§
Source§impl<'schema, 'fragreg> ExecutableDocument<'schema, 'fragreg>
impl<'schema, 'fragreg> ExecutableDocument<'schema, 'fragreg>
Sourcepub fn builder(
schema: &'schema Schema,
fragment_registry: &'fragreg FragmentRegistry<'schema>,
) -> ExecutableDocumentBuilder<'schema, 'fragreg>
pub fn builder( schema: &'schema Schema, fragment_registry: &'fragreg FragmentRegistry<'schema>, ) -> ExecutableDocumentBuilder<'schema, 'fragreg>
Convenience wrapper around ExecutableDocumentBuilder::new().
pub fn fragment_registry(&self) -> &'fragreg FragmentRegistry<'schema>
pub fn operations(&self) -> &Vec<Operation<'schema, 'fragreg>>
pub fn schema(&self) -> &'schema Schema
Trait Implementations§
Source§impl<'schema: 'fragreg, 'fragreg> Clone for ExecutableDocument<'schema, 'fragreg>
impl<'schema: 'fragreg, 'fragreg> Clone for ExecutableDocument<'schema, 'fragreg>
Source§fn clone(&self) -> ExecutableDocument<'schema, 'fragreg>
fn clone(&self) -> ExecutableDocument<'schema, 'fragreg>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'schema, 'fragreg> Freeze for ExecutableDocument<'schema, 'fragreg>
impl<'schema, 'fragreg> RefUnwindSafe for ExecutableDocument<'schema, 'fragreg>
impl<'schema, 'fragreg> Send for ExecutableDocument<'schema, 'fragreg>
impl<'schema, 'fragreg> Sync for ExecutableDocument<'schema, 'fragreg>
impl<'schema, 'fragreg> Unpin for ExecutableDocument<'schema, 'fragreg>
impl<'schema, 'fragreg> UnwindSafe for ExecutableDocument<'schema, 'fragreg>
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