Struct dagger_sdk::Host
source · pub struct Host {
pub proc: Option<Arc<Child>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<Child>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
source§impl Host
impl Host
sourcepub fn directory(&self, path: impl Into<String>) -> Directory
pub fn directory(&self, path: impl Into<String>) -> Directory
Accesses a directory on the host.
Arguments
path- Location of the directory to access (e.g., “.”).opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn directory_opts<'a>(
&self,
path: impl Into<String>,
opts: HostDirectoryOpts<'a>
) -> Directory
pub fn directory_opts<'a>( &self, path: impl Into<String>, opts: HostDirectoryOpts<'a> ) -> Directory
Accesses a directory on the host.
Arguments
path- Location of the directory to access (e.g., “.”).opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn env_variable(&self, name: impl Into<String>) -> HostVariable
pub fn env_variable(&self, name: impl Into<String>) -> HostVariable
Accesses an environment variable on the host.
Arguments
name- Name of the environment variable (e.g., “PATH”).
sourcepub fn unix_socket(&self, path: impl Into<String>) -> Socket
pub fn unix_socket(&self, path: impl Into<String>) -> Socket
Accesses a Unix socket on the host.
Arguments
path- Location of the Unix socket (e.g., “/var/run/docker.sock”).
sourcepub fn workdir(&self) -> Directory
pub fn workdir(&self) -> Directory
Retrieves the current working directory on the host.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn workdir_opts<'a>(&self, opts: HostWorkdirOpts<'a>) -> Directory
pub fn workdir_opts<'a>(&self, opts: HostWorkdirOpts<'a>) -> Directory
Retrieves the current working directory on the host.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl !UnwindSafe for Host
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
Mutably borrows from an owned value. Read more