Struct dagger_sdk::Module
source · 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 sdk(&self) -> Result<String, DaggerError>
pub async fn sdk(&self) -> Result<String, DaggerError>
The SDK used by this module. Either a name of a builtin SDK or a module source ref string pointing to the SDK’s implementation.
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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Module
impl !RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl !UnwindSafe 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)