pub struct Module {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<DaggerSessionProc>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
Source§impl Module
impl Module
Sourcepub fn check(&self, name: impl Into<String>) -> Check
pub fn check(&self, name: impl Into<String>) -> Check
Return the check defined by the module with the given name. Must match to exactly one check.
§Arguments
name- The name of the check to retrieve
Sourcepub fn checks(&self) -> CheckGroup
pub fn checks(&self) -> CheckGroup
Return all checks defined by the module
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn checks_opts<'a>(&self, opts: ModuleChecksOpts<'a>) -> CheckGroup
pub fn checks_opts<'a>(&self, opts: ModuleChecksOpts<'a>) -> CheckGroup
Return all checks defined by the module
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn dependencies(&self) -> Result<Vec<Module>, DaggerError>
pub async fn dependencies(&self) -> Result<Vec<Module>, DaggerError>
The dependencies of the module.
Sourcepub async fn description(&self) -> Result<String, DaggerError>
pub async fn description(&self) -> Result<String, DaggerError>
The doc string of the module, if any
Sourcepub async fn enums(&self) -> Result<Vec<TypeDef>, DaggerError>
pub async fn enums(&self) -> Result<Vec<TypeDef>, DaggerError>
Enumerations served by this module.
Sourcepub fn generated_context_directory(&self) -> Directory
pub fn generated_context_directory(&self) -> Directory
The generated files and directories made on top of the module source’s context directory.
Sourcepub fn generator(&self, name: impl Into<String>) -> Generator
pub fn generator(&self, name: impl Into<String>) -> Generator
Return the generator defined by the module with the given name. Must match to exactly one generator.
§Arguments
name- The name of the generator to retrieve
Sourcepub fn generators(&self) -> GeneratorGroup
pub fn generators(&self) -> GeneratorGroup
Return all generators defined by the module
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn generators_opts<'a>(
&self,
opts: ModuleGeneratorsOpts<'a>,
) -> GeneratorGroup
pub fn generators_opts<'a>( &self, opts: ModuleGeneratorsOpts<'a>, ) -> GeneratorGroup
Return all generators defined by the module
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn id(&self) -> Result<Id, DaggerError>
pub async fn id(&self) -> Result<Id, DaggerError>
A unique identifier for this Module.
Sourcepub async fn interfaces(&self) -> Result<Vec<TypeDef>, DaggerError>
pub async fn interfaces(&self) -> Result<Vec<TypeDef>, DaggerError>
Interfaces served by this module.
Sourcepub fn introspection_schema_json(&self) -> File
pub fn introspection_schema_json(&self) -> File
The introspection schema JSON file for this module. This file represents the schema visible to the module’s source code, including all core types and those from the dependencies. Note: this is in the context of a module, so some core types may be hidden.
Sourcepub async fn name(&self) -> Result<String, DaggerError>
pub async fn name(&self) -> Result<String, DaggerError>
The name of the module
Sourcepub async fn objects(&self) -> Result<Vec<TypeDef>, DaggerError>
pub async fn objects(&self) -> Result<Vec<TypeDef>, DaggerError>
Objects served by this module.
Sourcepub async fn runtime(&self) -> Result<Option<Container>, DaggerError>
pub async fn runtime(&self) -> Result<Option<Container>, DaggerError>
The container that runs the module’s entrypoint. It will fail to execute if the module doesn’t compile.
Sourcepub async fn sdk(&self) -> Result<Option<SdkConfig>, DaggerError>
pub async fn sdk(&self) -> Result<Option<SdkConfig>, DaggerError>
The SDK config used by this module.
Sourcepub async fn serve(&self) -> Result<Void, DaggerError>
pub async fn serve(&self) -> Result<Void, DaggerError>
Serve a module’s API in the current session. Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn serve_opts(
&self,
opts: ModuleServeOpts,
) -> Result<Void, DaggerError>
pub async fn serve_opts( &self, opts: ModuleServeOpts, ) -> Result<Void, DaggerError>
Serve a module’s API in the current session. Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn services(&self) -> UpGroup
pub fn services(&self) -> UpGroup
Return all services defined by the module
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn services_opts<'a>(&self, opts: ModuleServicesOpts<'a>) -> UpGroup
pub fn services_opts<'a>(&self, opts: ModuleServicesOpts<'a>) -> UpGroup
Return all services defined by the module
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn source(&self) -> Result<Option<ModuleSource>, DaggerError>
pub async fn source(&self) -> Result<Option<ModuleSource>, DaggerError>
The source for the module.
Sourcepub async fn sync(&self) -> Result<Module, DaggerError>
pub async fn sync(&self) -> Result<Module, DaggerError>
Forces evaluation of the module, including any loading into the engine and associated validation.
Sourcepub fn user_defaults(&self) -> EnvFile
pub fn user_defaults(&self) -> EnvFile
User-defined default values, loaded from local .env files.
Sourcepub fn with_description(&self, description: impl Into<String>) -> Module
pub fn with_description(&self, description: impl Into<String>) -> Module
Sourcepub fn with_enum(&self, enum: impl IntoID<Id>) -> Module
pub fn with_enum(&self, enum: impl IntoID<Id>) -> Module
This module plus the given Enum type and associated values
Sourcepub fn with_interface(&self, iface: impl IntoID<Id>) -> Module
pub fn with_interface(&self, iface: impl IntoID<Id>) -> Module
This module plus the given Interface type and associated functions
Sourcepub fn with_object(&self, object: impl IntoID<Id>) -> Module
pub fn with_object(&self, object: impl IntoID<Id>) -> Module
This module plus the given Object type and associated functions.
Trait Implementations§
Source§impl Loadable for Module
impl Loadable for Module
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 Module
impl !UnwindSafe for Module
impl Freeze for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
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