Struct dagger_sdk::CurrentModule
source · pub struct CurrentModule {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<DaggerSessionProc>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
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 moresource§impl IntoID<CurrentModuleId> for CurrentModule
impl IntoID<CurrentModuleId> for CurrentModule
fn into_id( self, ) -> Pin<Box<dyn Future<Output = Result<CurrentModuleId, DaggerError>> + Send>>
Auto Trait Implementations§
impl Freeze for CurrentModule
impl !RefUnwindSafe for CurrentModule
impl Send for CurrentModule
impl Sync for CurrentModule
impl Unpin for CurrentModule
impl !UnwindSafe for CurrentModule
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)