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 dependencies(&self) -> Vec<Module>
pub fn dependencies(&self) -> Vec<Module>
Modules used by this module.
Sourcepub fn dependency_config(&self) -> Vec<ModuleDependency>
pub fn dependency_config(&self) -> Vec<ModuleDependency>
The dependencies as configured by 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 fn generated_context_diff(&self) -> Directory
pub fn generated_context_diff(&self) -> Directory
The generated files and directories made on top of the module source’s context directory.
Sourcepub fn generated_context_directory(&self) -> Directory
pub fn generated_context_directory(&self) -> Directory
The module source’s context plus any configuration and source files created by codegen.
Sourcepub async fn id(&self) -> Result<ModuleId, DaggerError>
pub async fn id(&self) -> Result<ModuleId, DaggerError>
A unique identifier for this Module.
Sourcepub fn initialize(&self) -> Module
pub fn initialize(&self) -> Module
Retrieves the module with the objects loaded via its SDK.
Sourcepub fn interfaces(&self) -> Vec<TypeDef>
pub fn interfaces(&self) -> Vec<TypeDef>
Interfaces served by this module.
Sourcepub async fn name(&self) -> Result<String, DaggerError>
pub async fn name(&self) -> Result<String, DaggerError>
The name of the module
Sourcepub fn runtime(&self) -> Container
pub fn runtime(&self) -> Container
The container that runs the module’s entrypoint. It will fail to execute if the module doesn’t compile.
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.
Sourcepub fn source(&self) -> ModuleSource
pub fn source(&self) -> ModuleSource
The source for the module.
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<TypeDefId>) -> Module
pub fn with_enum(&self, enum: impl IntoID<TypeDefId>) -> Module
This module plus the given Enum type and associated values
Sourcepub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module
pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module
This module plus the given Interface type and associated functions
Sourcepub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module
pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module
This module plus the given Object type and associated functions.
Sourcepub fn with_source(&self, source: impl IntoID<ModuleSourceId>) -> Module
pub fn with_source(&self, source: impl IntoID<ModuleSourceId>) -> Module
Retrieves the module with basic configuration loaded if present.
§Arguments
source- The module source to initialize from.opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_source_opts<'a>(
&self,
source: impl IntoID<ModuleSourceId>,
opts: ModuleWithSourceOpts<'a>,
) -> Module
pub fn with_source_opts<'a>( &self, source: impl IntoID<ModuleSourceId>, opts: ModuleWithSourceOpts<'a>, ) -> Module
Retrieves the module with basic configuration loaded if present.
§Arguments
source- The module source to initialize from.opt- optional argument, see inner type for documentation, use_opts to use