pub struct ServiceTaskSpecContainerSpecBuilder<___State = __ServiceTaskSpecContainerSpecBuilderInitialState> { /* private fields */ }
Expand description

Use builder syntax to set the required parameters and finish by calling the method Self::build_struct().

Implementations§

source§

impl<__Args, __Commands, __Configs, __Dir, __DnsConfig, __Env, __Groups, __Healthcheck, __Hostname, __Hosts, __Image, __Isolation, __Labels, __Mounts, __Privileges, __ReadOnly, __Secrets, __StopGracePeriod, __StopSignal, __Sysctl, __User> ServiceTaskSpecContainerSpecBuilder<(__Args, __Commands, __Configs, __Dir, __DnsConfig, __Env, __Groups, __Healthcheck, __Hostname, __Hosts, __Image, __Isolation, __Labels, __Mounts, __Privileges, __ReadOnly, __Secrets, __StopGracePeriod, __StopSignal, __Sysctl, __User)>

source

pub fn build_struct(self) -> ServiceTaskSpecContainerSpec
where __Args: IntoSet<Option<Box<Option<Vec<String>>>>, ServiceTaskSpecContainerSpecBuilder__args>, __Commands: IntoSet<Option<Box<Option<Vec<String>>>>, ServiceTaskSpecContainerSpecBuilder__commands>, __Configs: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecContainerSpecConfig>>>>, ServiceTaskSpecContainerSpecBuilder__configs>, __Dir: IntoSet<Option<Box<Option<String>>>, ServiceTaskSpecContainerSpecBuilder__dir>, __DnsConfig: IntoSet<Option<Box<Option<ServiceTaskSpecContainerSpecDnsConfig>>>, ServiceTaskSpecContainerSpecBuilder__dns_config>, __Env: IntoSet<Option<Box<Option<HashMap<String, String>>>>, ServiceTaskSpecContainerSpecBuilder__env>, __Groups: IntoSet<Option<Box<Option<Vec<String>>>>, ServiceTaskSpecContainerSpecBuilder__groups>, __Healthcheck: IntoSet<Option<Box<Option<ServiceTaskSpecContainerSpecHealthcheck>>>, ServiceTaskSpecContainerSpecBuilder__healthcheck>, __Hostname: IntoSet<Option<Box<Option<String>>>, ServiceTaskSpecContainerSpecBuilder__hostname>, __Hosts: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecContainerSpecHost>>>>, ServiceTaskSpecContainerSpecBuilder__hosts>, __Image: IntoSet<Box<String>, ServiceTaskSpecContainerSpecBuilder__image>, __Isolation: IntoSet<Option<Box<Option<String>>>, ServiceTaskSpecContainerSpecBuilder__isolation>, __Labels: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecContainerSpecLabel>>>>, ServiceTaskSpecContainerSpecBuilder__labels>, __Mounts: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecContainerSpecMount>>>>, ServiceTaskSpecContainerSpecBuilder__mounts>, __Privileges: IntoSet<Option<Box<Option<ServiceTaskSpecContainerSpecPrivileges>>>, ServiceTaskSpecContainerSpecBuilder__privileges>, __ReadOnly: IntoSet<Option<Box<Option<bool>>>, ServiceTaskSpecContainerSpecBuilder__read_only>, __Secrets: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecContainerSpecSecret>>>>, ServiceTaskSpecContainerSpecBuilder__secrets>, __StopGracePeriod: IntoSet<Option<Box<Option<String>>>, ServiceTaskSpecContainerSpecBuilder__stop_grace_period>, __StopSignal: IntoSet<Option<Box<Option<String>>>, ServiceTaskSpecContainerSpecBuilder__stop_signal>, __Sysctl: IntoSet<Option<Box<Option<HashMap<String, String>>>>, ServiceTaskSpecContainerSpecBuilder__sysctl>, __User: IntoSet<Option<Box<Option<String>>>, ServiceTaskSpecContainerSpecBuilder__user>,

Finishes building and returns the requested object.

source

pub fn maybe_args( self, value: Option<impl Into<Box<Option<Vec<String>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Args
where __Args: IsUnset,

Same as [Self::r#args], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn args( self, value: impl Into<Box<Option<Vec<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Args
where __Args: IsUnset,

Arguments to the command

source

pub fn maybe_commands( self, value: Option<impl Into<Box<Option<Vec<String>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Commands
where __Commands: IsUnset,

Same as [Self::r#commands], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn commands( self, value: impl Into<Box<Option<Vec<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Commands
where __Commands: IsUnset,

The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service.

source

pub fn maybe_configs( self, value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecConfig>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Configs
where __Configs: IsUnset,

Same as [Self::r#configs], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn configs( self, value: impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecConfig>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Configs
where __Configs: IsUnset,

References to zero or more configs that will be exposed to the service

source

pub fn maybe_dir( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Dir
where __Dir: IsUnset,

Same as [Self::r#dir], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn dir( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Dir
where __Dir: IsUnset,

The working directory for commands to run in

source

pub fn maybe_dns_config( self, value: Option<impl Into<Box<Option<ServiceTaskSpecContainerSpecDnsConfig>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::DnsConfig
where __DnsConfig: IsUnset,

Same as [Self::r#dns_config], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn dns_config( self, value: impl Into<Box<Option<ServiceTaskSpecContainerSpecDnsConfig>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::DnsConfig
where __DnsConfig: IsUnset,

Specification for DNS related configurations in resolver configuration file (resolv.conf)

source

pub fn maybe_env( self, value: Option<impl Into<Box<Option<HashMap<String, String>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Env
where __Env: IsUnset,

Same as [Self::r#env], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn env( self, value: impl Into<Box<Option<HashMap<String, String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Env
where __Env: IsUnset,

A list of environment variables in the form VAR=“value”

source

pub fn maybe_groups( self, value: Option<impl Into<Box<Option<Vec<String>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Groups
where __Groups: IsUnset,

Same as [Self::r#groups], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn groups( self, value: impl Into<Box<Option<Vec<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Groups
where __Groups: IsUnset,

A list of additional groups that the container process will run as

source

pub fn maybe_healthcheck( self, value: Option<impl Into<Box<Option<ServiceTaskSpecContainerSpecHealthcheck>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Healthcheck
where __Healthcheck: IsUnset,

Same as [Self::r#healthcheck], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn healthcheck( self, value: impl Into<Box<Option<ServiceTaskSpecContainerSpecHealthcheck>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Healthcheck
where __Healthcheck: IsUnset,

A test to perform to check that the container is healthy

source

pub fn maybe_hostname( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Hostname
where __Hostname: IsUnset,

Same as [Self::r#hostname], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn hostname( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Hostname
where __Hostname: IsUnset,

The hostname to use for the container, as a valid RFC 1123 hostname

source

pub fn maybe_hosts( self, value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecHost>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Hosts
where __Hosts: IsUnset,

Same as [Self::r#hosts], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn hosts( self, value: impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecHost>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Hosts
where __Hosts: IsUnset,

A list of hostname/IP mappings to add to the container’s hosts file

source

pub fn image( self, value: impl Into<Box<String>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Image
where __Image: IsUnset,

The image name to use for the containers of the service, like nginx:1.17.6. Also use the data-source or resource of docker.RemoteImage with the repo_digest or docker.RegistryImage with the name attribute for this, as shown in the examples.

source

pub fn maybe_isolation( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Isolation
where __Isolation: IsUnset,

Same as [Self::r#isolation], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn isolation( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Isolation
where __Isolation: IsUnset,

Isolation technology of the containers running the service. (Windows only). Defaults to default.

source

pub fn maybe_labels( self, value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecLabel>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Labels
where __Labels: IsUnset,

Same as [Self::r#labels], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn labels( self, value: impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecLabel>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Labels
where __Labels: IsUnset,

User-defined key/value metadata

source

pub fn maybe_mounts( self, value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecMount>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Mounts
where __Mounts: IsUnset,

Same as [Self::r#mounts], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn mounts( self, value: impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecMount>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Mounts
where __Mounts: IsUnset,

Specification for mounts to be added to containers created as part of the service

source

pub fn maybe_privileges( self, value: Option<impl Into<Box<Option<ServiceTaskSpecContainerSpecPrivileges>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Privileges
where __Privileges: IsUnset,

Same as [Self::r#privileges], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn privileges( self, value: impl Into<Box<Option<ServiceTaskSpecContainerSpecPrivileges>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Privileges
where __Privileges: IsUnset,

Security options for the container

source

pub fn maybe_read_only( self, value: Option<impl Into<Box<Option<bool>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::ReadOnly
where __ReadOnly: IsUnset,

Same as [Self::r#read_only], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn read_only( self, value: impl Into<Box<Option<bool>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::ReadOnly
where __ReadOnly: IsUnset,

Mount the container’s root filesystem as read only

source

pub fn maybe_secrets( self, value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecSecret>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Secrets
where __Secrets: IsUnset,

Same as [Self::r#secrets], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn secrets( self, value: impl Into<Box<Option<Vec<ServiceTaskSpecContainerSpecSecret>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Secrets
where __Secrets: IsUnset,

References to zero or more secrets that will be exposed to the service

source

pub fn maybe_stop_grace_period( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::StopGracePeriod
where __StopGracePeriod: IsUnset,

Same as [Self::r#stop_grace_period], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn stop_grace_period( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::StopGracePeriod
where __StopGracePeriod: IsUnset,

Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or ‘0s’ the destroy will not check if all tasks/containers of the service terminate.

source

pub fn maybe_stop_signal( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::StopSignal
where __StopSignal: IsUnset,

Same as [Self::r#stop_signal], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn stop_signal( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::StopSignal
where __StopSignal: IsUnset,

Signal to stop the container

source

pub fn maybe_sysctl( self, value: Option<impl Into<Box<Option<HashMap<String, String>>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Sysctl
where __Sysctl: IsUnset,

Same as [Self::r#sysctl], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn sysctl( self, value: impl Into<Box<Option<HashMap<String, String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::Sysctl
where __Sysctl: IsUnset,

Sysctls config (Linux only)

source

pub fn maybe_user( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::User
where __User: IsUnset,

Same as [Self::r#user], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn user( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceTaskSpecContainerSpecBuilderSetMember>::User
where __User: IsUnset,

The user inside the container

Auto Trait Implementations§

§

impl<___State> Freeze for ServiceTaskSpecContainerSpecBuilder<___State>
where ___State: Freeze,

§

impl<___State> RefUnwindSafe for ServiceTaskSpecContainerSpecBuilder<___State>
where ___State: RefUnwindSafe,

§

impl<___State> Send for ServiceTaskSpecContainerSpecBuilder<___State>
where ___State: Send,

§

impl<___State> Sync for ServiceTaskSpecContainerSpecBuilder<___State>
where ___State: Sync,

§

impl<___State> Unpin for ServiceTaskSpecContainerSpecBuilder<___State>
where ___State: Unpin,

§

impl<___State> UnwindSafe for ServiceTaskSpecContainerSpecBuilder<___State>
where ___State: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.