pub enum DocumentOperations {
Single(Positioned<OperationDefinition>),
Multiple(HashMap<Name, Positioned<OperationDefinition>>),
}
Expand description
The operations of a GraphQL document.
There is either one anonymous operation or many named operations.
Variants§
Single(Positioned<OperationDefinition>)
The document contains a single anonymous operation.
Multiple(HashMap<Name, Positioned<OperationDefinition>>)
The document contains many named operations.
Implementations§
Source§impl DocumentOperations
impl DocumentOperations
Sourcepub fn iter(&self) -> OperationsIter<'_> ⓘ
pub fn iter(&self) -> OperationsIter<'_> ⓘ
Iterate over the operations of the document.
Trait Implementations§
Source§impl AstPositionExt for DocumentOperations
impl AstPositionExt for DocumentOperations
Source§fn default_position(self) -> Positioned<Self>
fn default_position(self) -> Positioned<Self>
Create a positioned version of this AST node with the default position (0:0).
Source§fn with_position(self, pos: Pos) -> Positioned<Self>
fn with_position(self, pos: Pos) -> Positioned<Self>
Create a positioned version of this AST node with the given position.
Source§impl Clone for DocumentOperations
impl Clone for DocumentOperations
Source§fn clone(&self) -> DocumentOperations
fn clone(&self) -> DocumentOperations
Returns a copy 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 moreSource§impl Debug for DocumentOperations
impl Debug for DocumentOperations
Source§impl<'de> Deserialize<'de> for DocumentOperations
impl<'de> Deserialize<'de> for DocumentOperations
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DocumentOperations, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DocumentOperations, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoAst<DocumentOperations> for DocumentOperations
impl IntoAst<DocumentOperations> for DocumentOperations
Source§fn into_ast(self) -> DocumentOperations
fn into_ast(self) -> DocumentOperations
Returns the input value unchanged.
Source§impl Serialize for DocumentOperations
impl Serialize for DocumentOperations
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for DocumentOperations
impl RefUnwindSafe for DocumentOperations
impl Send for DocumentOperations
impl Sync for DocumentOperations
impl Unpin for DocumentOperations
impl UnwindSafe for DocumentOperations
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