pub struct Function {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<DaggerSessionProc>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
Source§impl Function
impl Function
Sourcepub async fn args(&self) -> Result<Vec<FunctionArg>, DaggerError>
pub async fn args(&self) -> Result<Vec<FunctionArg>, DaggerError>
Arguments accepted by the function, if any.
Sourcepub async fn deprecated(&self) -> Result<String, DaggerError>
pub async fn deprecated(&self) -> Result<String, DaggerError>
The reason this function is deprecated, if any.
Sourcepub async fn description(&self) -> Result<String, DaggerError>
pub async fn description(&self) -> Result<String, DaggerError>
A doc string for the function, if any.
Sourcepub async fn id(&self) -> Result<Id, DaggerError>
pub async fn id(&self) -> Result<Id, DaggerError>
A unique identifier for this Function.
Sourcepub async fn name(&self) -> Result<String, DaggerError>
pub async fn name(&self) -> Result<String, DaggerError>
The name of the function.
Sourcepub fn return_type(&self) -> TypeDef
pub fn return_type(&self) -> TypeDef
The type returned by the function.
Sourcepub async fn source_map(&self) -> Result<Option<SourceMap>, DaggerError>
pub async fn source_map(&self) -> Result<Option<SourceMap>, DaggerError>
The location of this function declaration.
Sourcepub async fn source_module_name(&self) -> Result<String, DaggerError>
pub async fn source_module_name(&self) -> Result<String, DaggerError>
If this function is provided by a module, the name of the module. Unset otherwise.
Sourcepub fn with_agent(&self) -> Function
pub fn with_agent(&self) -> Function
Returns the function with a flag indicating it is an agent middleware.
Sourcepub fn with_arg(
&self,
name: impl Into<String>,
type_def: impl IntoID<Id>,
) -> Function
pub fn with_arg( &self, name: impl Into<String>, type_def: impl IntoID<Id>, ) -> Function
Returns the function with the provided argument
§Arguments
name- The name of the argumenttype_def- The type of the argumentopt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_arg_opts<'a>(
&self,
name: impl Into<String>,
type_def: impl IntoID<Id>,
opts: FunctionWithArgOpts<'a>,
) -> Function
pub fn with_arg_opts<'a>( &self, name: impl Into<String>, type_def: impl IntoID<Id>, opts: FunctionWithArgOpts<'a>, ) -> Function
Returns the function with the provided argument
§Arguments
name- The name of the argumenttype_def- The type of the argumentopt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_cache_policy(&self, policy: FunctionCachePolicy) -> Function
pub fn with_cache_policy(&self, policy: FunctionCachePolicy) -> Function
Returns the function updated to use the provided cache policy.
§Arguments
policy- The cache policy to use.opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_cache_policy_opts<'a>(
&self,
policy: FunctionCachePolicy,
opts: FunctionWithCachePolicyOpts<'a>,
) -> Function
pub fn with_cache_policy_opts<'a>( &self, policy: FunctionCachePolicy, opts: FunctionWithCachePolicyOpts<'a>, ) -> Function
Returns the function updated to use the provided cache policy.
§Arguments
policy- The cache policy to use.opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_check(&self) -> Function
pub fn with_check(&self) -> Function
Returns the function with a flag indicating it’s a check.
Sourcepub fn with_deprecated(&self) -> Function
pub fn with_deprecated(&self) -> Function
Returns the function with the provided deprecation reason.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_deprecated_opts<'a>(
&self,
opts: FunctionWithDeprecatedOpts<'a>,
) -> Function
pub fn with_deprecated_opts<'a>( &self, opts: FunctionWithDeprecatedOpts<'a>, ) -> Function
Returns the function with the provided deprecation reason.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_description(&self, description: impl Into<String>) -> Function
pub fn with_description(&self, description: impl Into<String>) -> Function
Sourcepub fn with_generator(&self) -> Function
pub fn with_generator(&self) -> Function
Returns the function with a flag indicating it’s a generator.
Trait Implementations§
Source§impl Loadable for Function
impl Loadable for Function
Source§fn graphql_type() -> &'static str
fn graphql_type() -> &'static str
"Container").Source§fn from_query(
proc: Option<Arc<DaggerSessionProc>>,
selection: Selection,
graphql_client: DynGraphQLClient,
) -> Self
fn from_query( proc: Option<Arc<DaggerSessionProc>>, selection: Selection, graphql_client: DynGraphQLClient, ) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Function
impl !UnwindSafe for Function
impl Freeze for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
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
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> ⓘ
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> ⓘ
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