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 !RefUnwindSafe for Selection
impl !UnwindSafe for Selection
impl Freeze for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more