pub struct Module {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}
Fields§
§proc: Option<Arc<DaggerSessionProc>>
§selection: Selection
§graphql_client: DynGraphQLClient
Implementations§
Source§impl Module
impl Module
Sourcepub fn dependencies(&self) -> Vec<Module>
pub fn dependencies(&self) -> Vec<Module>
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 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 async fn id(&self) -> Result<ModuleId, DaggerError>
pub async fn id(&self) -> Result<ModuleId, DaggerError>
A unique identifier for this Module.
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.
§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 source(&self) -> ModuleSource
pub fn source(&self) -> ModuleSource
The source for the module.
Sourcepub async fn sync(&self) -> Result<ModuleId, DaggerError>
pub async fn sync(&self) -> Result<ModuleId, DaggerError>
Forces evaluation of the module, including any loading into the engine and associated validation.
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.