Struct dagger_sdk::Container

source ·
pub struct Container {
    pub proc: Arc<Child>,
    pub selection: Selection,
    pub conn: ConnectParams,
}

Fields§

§proc: Arc<Child>§selection: Selection§conn: ConnectParams

Implementations§

source§

impl Container

source

pub fn build(&self, context: DirectoryId) -> Container

source

pub fn build_opts<'a>( &self, context: DirectoryId, opts: ContainerBuildOpts<'a> ) -> Container

source

pub async fn default_args(&self) -> Result<Vec<String>>

source

pub fn directory(&self, path: impl Into<String>) -> Directory

source

pub async fn entrypoint(&self) -> Result<Vec<String>>

source

pub async fn env_variable(&self, name: impl Into<String>) -> Result<String>

source

pub fn env_variables(&self) -> Vec<EnvVariable>

source

pub fn exec(&self) -> Container

source

pub fn exec_opts<'a>(&self, opts: ContainerExecOpts<'a>) -> Container

source

pub async fn exit_code(&self) -> Result<isize>

source

pub async fn export(&self, path: impl Into<String>) -> Result<bool>

source

pub async fn export_opts( &self, path: impl Into<String>, opts: ContainerExportOpts ) -> Result<bool>

source

pub fn file(&self, path: impl Into<String>) -> File

source

pub fn from(&self, address: impl Into<String>) -> Container

source

pub fn fs(&self) -> Directory

source

pub async fn id(&self) -> Result<ContainerId>

source

pub async fn label(&self, name: impl Into<String>) -> Result<String>

source

pub fn labels(&self) -> Vec<Label>

source

pub async fn mounts(&self) -> Result<Vec<String>>

source

pub fn pipeline(&self, name: impl Into<String>) -> Container

source

pub fn pipeline_opts<'a>( &self, name: impl Into<String>, opts: ContainerPipelineOpts<'a> ) -> Container

source

pub async fn platform(&self) -> Result<Platform>

source

pub async fn publish(&self, address: impl Into<String>) -> Result<String>

source

pub async fn publish_opts( &self, address: impl Into<String>, opts: ContainerPublishOpts ) -> Result<String>

source

pub fn rootfs(&self) -> Directory

source

pub async fn stderr(&self) -> Result<String>

source

pub async fn stdout(&self) -> Result<String>

source

pub async fn user(&self) -> Result<String>

source

pub fn with_default_args(&self) -> Container

source

pub fn with_default_args_opts<'a>( &self, opts: ContainerWithDefaultArgsOpts<'a> ) -> Container

source

pub fn with_directory( &self, path: impl Into<String>, directory: DirectoryId ) -> Container

source

pub fn with_directory_opts<'a>( &self, path: impl Into<String>, directory: DirectoryId, opts: ContainerWithDirectoryOpts<'a> ) -> Container

source

pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container

source

pub fn with_env_variable( &self, name: impl Into<String>, value: impl Into<String> ) -> Container

source

pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container

source

pub fn with_exec_opts<'a>( &self, args: Vec<impl Into<String>>, opts: ContainerWithExecOpts<'a> ) -> Container

source

pub fn with_fs(&self, id: DirectoryId) -> Container

source

pub fn with_file(&self, path: impl Into<String>, source: FileId) -> Container

source

pub fn with_file_opts( &self, path: impl Into<String>, source: FileId, opts: ContainerWithFileOpts ) -> Container

source

pub fn with_label( &self, name: impl Into<String>, value: impl Into<String> ) -> Container

source

pub fn with_mounted_cache( &self, path: impl Into<String>, cache: CacheId ) -> Container

source

pub fn with_mounted_cache_opts( &self, path: impl Into<String>, cache: CacheId, opts: ContainerWithMountedCacheOpts ) -> Container

source

pub fn with_mounted_directory( &self, path: impl Into<String>, source: DirectoryId ) -> Container

source

pub fn with_mounted_file( &self, path: impl Into<String>, source: FileId ) -> Container

source

pub fn with_mounted_secret( &self, path: impl Into<String>, source: SecretId ) -> Container

source

pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container

source

pub fn with_new_file(&self, path: impl Into<String>) -> Container

source

pub fn with_new_file_opts<'a>( &self, path: impl Into<String>, opts: ContainerWithNewFileOpts<'a> ) -> Container

source

pub fn with_registry_auth( &self, address: impl Into<String>, username: impl Into<String>, secret: SecretId ) -> Container

source

pub fn with_rootfs(&self, id: DirectoryId) -> Container

source

pub fn with_secret_variable( &self, name: impl Into<String>, secret: SecretId ) -> Container

source

pub fn with_unix_socket( &self, path: impl Into<String>, source: SocketId ) -> Container

source

pub fn with_user(&self, name: impl Into<String>) -> Container

source

pub fn with_workdir(&self, path: impl Into<String>) -> Container

source

pub fn without_env_variable(&self, name: impl Into<String>) -> Container

source

pub fn without_label(&self, name: impl Into<String>) -> Container

source

pub fn without_mount(&self, path: impl Into<String>) -> Container

source

pub fn without_registry_auth(&self, address: impl Into<String>) -> Container

source

pub fn without_unix_socket(&self, path: impl Into<String>) -> Container

source

pub async fn workdir(&self) -> Result<String>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more