pub struct Workspace {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<DaggerSessionProc>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
Source§impl Workspace
impl Workspace
Sourcepub async fn address(&self) -> Result<String, DaggerError>
pub async fn address(&self) -> Result<String, DaggerError>
Canonical Dagger address of the workspace directory.
Sourcepub fn checks(&self) -> CheckGroup
pub fn checks(&self) -> CheckGroup
Return all checks from modules loaded in the workspace.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn checks_opts<'a>(&self, opts: WorkspaceChecksOpts<'a>) -> CheckGroup
pub fn checks_opts<'a>(&self, opts: WorkspaceChecksOpts<'a>) -> CheckGroup
Return all checks from modules loaded in the workspace.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn client_id(&self) -> Result<String, DaggerError>
pub async fn client_id(&self) -> Result<String, DaggerError>
The client ID that owns this workspace’s host filesystem.
Sourcepub async fn config_path(&self) -> Result<String, DaggerError>
pub async fn config_path(&self) -> Result<String, DaggerError>
Path to config.toml relative to the workspace boundary (empty if not initialized).
Sourcepub fn directory(&self, path: impl Into<String>) -> Directory
pub fn directory(&self, path: impl Into<String>) -> Directory
Returns a Directory from the workspace. Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.
§Arguments
path- Location of the directory to retrieve. Relative paths (e.g., “src”) resolve from the workspace directory; absolute paths (e.g., “/src”) resolve from the workspace boundary.opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn directory_opts<'a>(
&self,
path: impl Into<String>,
opts: WorkspaceDirectoryOpts<'a>,
) -> Directory
pub fn directory_opts<'a>( &self, path: impl Into<String>, opts: WorkspaceDirectoryOpts<'a>, ) -> Directory
Returns a Directory from the workspace. Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.
§Arguments
path- Location of the directory to retrieve. Relative paths (e.g., “src”) resolve from the workspace directory; absolute paths (e.g., “/src”) resolve from the workspace boundary.opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn file(&self, path: impl Into<String>) -> File
pub fn file(&self, path: impl Into<String>) -> File
Returns a File from the workspace. Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.
§Arguments
path- Location of the file to retrieve. Relative paths (e.g., “go.mod”) resolve from the workspace directory; absolute paths (e.g., “/go.mod”) resolve from the workspace boundary.
Sourcepub async fn find_up(
&self,
name: impl Into<String>,
) -> Result<String, DaggerError>
pub async fn find_up( &self, name: impl Into<String>, ) -> Result<String, DaggerError>
Search for a file or directory by walking up from the start path within the workspace. Returns the absolute workspace path if found, or null if not found. Relative start paths resolve from the workspace directory. The search stops at the workspace boundary and will not traverse above it.
§Arguments
name- The name of the file or directory to search for.opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn find_up_opts<'a>(
&self,
name: impl Into<String>,
opts: WorkspaceFindUpOpts<'a>,
) -> Result<String, DaggerError>
pub async fn find_up_opts<'a>( &self, name: impl Into<String>, opts: WorkspaceFindUpOpts<'a>, ) -> Result<String, DaggerError>
Search for a file or directory by walking up from the start path within the workspace. Returns the absolute workspace path if found, or null if not found. Relative start paths resolve from the workspace directory. The search stops at the workspace boundary and will not traverse above it.
§Arguments
name- The name of the file or directory to search for.opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn generators(&self) -> GeneratorGroup
pub fn generators(&self) -> GeneratorGroup
Return all generators from modules loaded in the workspace.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn generators_opts<'a>(
&self,
opts: WorkspaceGeneratorsOpts<'a>,
) -> GeneratorGroup
pub fn generators_opts<'a>( &self, opts: WorkspaceGeneratorsOpts<'a>, ) -> GeneratorGroup
Return all generators from modules loaded in the workspace.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn has_config(&self) -> Result<bool, DaggerError>
pub async fn has_config(&self) -> Result<bool, DaggerError>
Whether a config.toml file exists in the workspace.
Sourcepub async fn id(&self) -> Result<WorkspaceId, DaggerError>
pub async fn id(&self) -> Result<WorkspaceId, DaggerError>
A unique identifier for this Workspace.
Sourcepub async fn initialized(&self) -> Result<bool, DaggerError>
pub async fn initialized(&self) -> Result<bool, DaggerError>
Whether .dagger/config.toml exists.
Sourcepub async fn path(&self) -> Result<String, DaggerError>
pub async fn path(&self) -> Result<String, DaggerError>
Workspace directory path relative to the workspace boundary.
Sourcepub fn services(&self) -> UpGroup
pub fn services(&self) -> UpGroup
Return all services from modules loaded in the workspace.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn services_opts<'a>(&self, opts: WorkspaceServicesOpts<'a>) -> UpGroup
pub fn services_opts<'a>(&self, opts: WorkspaceServicesOpts<'a>) -> UpGroup
Return all services from modules loaded in the workspace.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use