pub struct Host {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<DaggerSessionProc>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
Source§impl Host
impl Host
Sourcepub fn container_image(&self, name: impl Into<String>) -> Container
pub fn container_image(&self, name: impl Into<String>) -> Container
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 file(&self, path: impl Into<String>) -> File
pub fn file(&self, path: impl Into<String>) -> File
Accesses a file on the host.
§Arguments
path- Location of the file to retrieve (e.g., “README.md”).opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File
pub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File
Accesses a file on the host.
§Arguments
path- Location of the file to retrieve (e.g., “README.md”).opt- optional argument, see inner type for documentation, use_opts to use
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 the tree from system workdir. Return its relative path. If no match, return null
§Arguments
name- name of the file or directory to search foropt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn find_up_opts(
&self,
name: impl Into<String>,
opts: HostFindUpOpts,
) -> Result<String, DaggerError>
pub async fn find_up_opts( &self, name: impl Into<String>, opts: HostFindUpOpts, ) -> Result<String, DaggerError>
Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
§Arguments
name- name of the file or directory to search foropt- optional argument, see inner type for documentation, use_opts to use
Sourcepub async fn id(&self) -> Result<Id, DaggerError>
pub async fn id(&self) -> Result<Id, DaggerError>
A unique identifier for this Host.
Sourcepub fn service(&self, ports: Vec<PortForward>) -> Service
pub fn service(&self, ports: Vec<PortForward>) -> Service
Creates a service that forwards traffic to a specified address via the host.
§Arguments
ports- Ports to expose via the service, forwarding through the host network.
If a port’s frontend is unspecified or 0, it defaults to the same as the backend port.
An empty set of ports is not valid; an error will be returned.
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn service_opts<'a>(
&self,
ports: Vec<PortForward>,
opts: HostServiceOpts<'a>,
) -> Service
pub fn service_opts<'a>( &self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>, ) -> Service
Creates a service that forwards traffic to a specified address via the host.
§Arguments
ports- Ports to expose via the service, forwarding through the host network.
If a port’s frontend is unspecified or 0, it defaults to the same as the backend port.
An empty set of ports is not valid; an error will be returned.
opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn tunnel(&self, service: impl IntoID<Id>) -> Service
pub fn tunnel(&self, service: impl IntoID<Id>) -> Service
Creates a tunnel that forwards traffic from the host to a service.
§Arguments
service- Service to send traffic from the tunnel.opt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn tunnel_opts(
&self,
service: impl IntoID<Id>,
opts: HostTunnelOpts,
) -> Service
pub fn tunnel_opts( &self, service: impl IntoID<Id>, opts: HostTunnelOpts, ) -> Service
Creates a tunnel that forwards traffic from the host to a service.
§Arguments
service- Service to send traffic from the tunnel.opt- optional argument, see inner type for documentation, use_opts to use
Trait Implementations§
Source§impl Loadable for Host
impl Loadable for Host
Source§fn graphql_type() -> &'static str
fn graphql_type() -> &'static str
"Container").Source§fn from_query(
proc: Option<Arc<DaggerSessionProc>>,
selection: Selection,
graphql_client: DynGraphQLClient,
) -> Self
fn from_query( proc: Option<Arc<DaggerSessionProc>>, selection: Selection, graphql_client: DynGraphQLClient, ) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Host
impl !UnwindSafe for Host
impl Freeze for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more