pub struct Selection { /* private fields */ }Implementations§
Source§impl Selection
impl Selection
Sourcepub fn root(&self) -> Selection
pub fn root(&self) -> Selection
Return a new root Selection, discarding the current query path.
Used by ConvertID (e.g. sync) to build node(id) { ... on Foo {} }
starting from a fresh root.
pub fn select_with_alias(&self, alias: &str, name: &str) -> Selection
pub fn select(&self, name: &str) -> Selection
Sourcepub fn inline_fragment(&self, type_name: &str) -> Selection
pub fn inline_fragment(&self, type_name: &str) -> Selection
Add an inline fragment type condition (... on TypeName).
Subsequent selections will be nested inside the fragment.
The response data is flat — the fragment doesn’t add a nesting
level during unpack.
pub fn arg<S>(&self, name: &str, value: S) -> Selectionwhere
S: Serialize,
pub fn arg_lazy( &self, name: &str, value: Box<dyn Fn() -> Pin<Box<dyn Future<Output = String> + Send>> + Send + Sync>, ) -> Selection
pub async fn build(&self) -> Result<String, DaggerError>
pub async fn execute<D>(
&self,
gql_client: DynGraphQLClient,
) -> Result<D, DaggerError>where
D: for<'de> Deserialize<'de>,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Selection
impl !RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnsafeUnpin for Selection
impl !UnwindSafe for Selection
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