pub struct CurrentModule {
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 CurrentModule
impl CurrentModule
Sourcepub async fn id(&self) -> Result<CurrentModuleId, DaggerError>
pub async fn id(&self) -> Result<CurrentModuleId, DaggerError>
A unique identifier for this CurrentModule.
Sourcepub async fn name(&self) -> Result<String, DaggerError>
pub async fn name(&self) -> Result<String, DaggerError>
The name of the module being executed in
Sourcepub fn source(&self) -> Directory
pub fn source(&self) -> Directory
The directory containing the module’s source code loaded into the engine (plus any generated code that may have been created).
Sourcepub fn workdir(&self, path: impl Into<String>) -> Directory
pub fn workdir(&self, path: impl Into<String>) -> Directory
Load a directory from the module’s scratch working directory, including any changes that may have been made to it during module function execution.
§Arguments
path
- Location of the directory to access (e.g., “.”).opt
- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn workdir_opts<'a>(
&self,
path: impl Into<String>,
opts: CurrentModuleWorkdirOpts<'a>,
) -> Directory
pub fn workdir_opts<'a>( &self, path: impl Into<String>, opts: CurrentModuleWorkdirOpts<'a>, ) -> Directory
Load a directory from the module’s scratch working directory, including any changes that may have been made to it during module function execution.
§Arguments
path
- Location of the directory to access (e.g., “.”).opt
- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn workdir_file(&self, path: impl Into<String>) -> File
pub fn workdir_file(&self, path: impl Into<String>) -> File
Load a file from the module’s scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module’s scratch working directory, including any changes that may have been made to it during module function execution.
§Arguments
path
- Location of the file to retrieve (e.g., “README.md”).
Trait Implementations§
Source§impl Clone for CurrentModule
impl Clone for CurrentModule
Source§fn clone(&self) -> CurrentModule
fn clone(&self) -> CurrentModule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more