pub struct ServiceTaskSpecBuilder<___State = __ServiceTaskSpecBuilderInitialState> { /* private fields */ }
Expand description
Use builder syntax to set the required parameters and finish by calling the method Self::build_struct()
.
Implementations§
source§impl<__ContainerSpec, __ForceUpdate, __LogDriver, __NetworksAdvanceds, __Placement, __Resources, __RestartPolicy, __Runtime> ServiceTaskSpecBuilder<(__ContainerSpec, __ForceUpdate, __LogDriver, __NetworksAdvanceds, __Placement, __Resources, __RestartPolicy, __Runtime)>
impl<__ContainerSpec, __ForceUpdate, __LogDriver, __NetworksAdvanceds, __Placement, __Resources, __RestartPolicy, __Runtime> ServiceTaskSpecBuilder<(__ContainerSpec, __ForceUpdate, __LogDriver, __NetworksAdvanceds, __Placement, __Resources, __RestartPolicy, __Runtime)>
sourcepub fn build_struct(self) -> ServiceTaskSpecwhere
__ContainerSpec: IntoSet<Box<ServiceTaskSpecContainerSpec>, ServiceTaskSpecBuilder__container_spec>,
__ForceUpdate: IntoSet<Option<Box<Option<i32>>>, ServiceTaskSpecBuilder__force_update>,
__LogDriver: IntoSet<Option<Box<Option<ServiceTaskSpecLogDriver>>>, ServiceTaskSpecBuilder__log_driver>,
__NetworksAdvanceds: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecNetworksAdvanced>>>>, ServiceTaskSpecBuilder__networks_advanceds>,
__Placement: IntoSet<Option<Box<Option<ServiceTaskSpecPlacement>>>, ServiceTaskSpecBuilder__placement>,
__Resources: IntoSet<Option<Box<Option<ServiceTaskSpecResources>>>, ServiceTaskSpecBuilder__resources>,
__RestartPolicy: IntoSet<Option<Box<Option<ServiceTaskSpecRestartPolicy>>>, ServiceTaskSpecBuilder__restart_policy>,
__Runtime: IntoSet<Option<Box<Option<String>>>, ServiceTaskSpecBuilder__runtime>,
pub fn build_struct(self) -> ServiceTaskSpecwhere
__ContainerSpec: IntoSet<Box<ServiceTaskSpecContainerSpec>, ServiceTaskSpecBuilder__container_spec>,
__ForceUpdate: IntoSet<Option<Box<Option<i32>>>, ServiceTaskSpecBuilder__force_update>,
__LogDriver: IntoSet<Option<Box<Option<ServiceTaskSpecLogDriver>>>, ServiceTaskSpecBuilder__log_driver>,
__NetworksAdvanceds: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecNetworksAdvanced>>>>, ServiceTaskSpecBuilder__networks_advanceds>,
__Placement: IntoSet<Option<Box<Option<ServiceTaskSpecPlacement>>>, ServiceTaskSpecBuilder__placement>,
__Resources: IntoSet<Option<Box<Option<ServiceTaskSpecResources>>>, ServiceTaskSpecBuilder__resources>,
__RestartPolicy: IntoSet<Option<Box<Option<ServiceTaskSpecRestartPolicy>>>, ServiceTaskSpecBuilder__restart_policy>,
__Runtime: IntoSet<Option<Box<Option<String>>>, ServiceTaskSpecBuilder__runtime>,
Finishes building and returns the requested object.
sourcepub fn container_spec(
self,
value: impl Into<Box<ServiceTaskSpecContainerSpec>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::ContainerSpecwhere
__ContainerSpec: IsUnset,
pub fn container_spec(
self,
value: impl Into<Box<ServiceTaskSpecContainerSpec>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::ContainerSpecwhere
__ContainerSpec: IsUnset,
The spec for each container
sourcepub fn maybe_force_update(
self,
value: Option<impl Into<Box<Option<i32>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::ForceUpdatewhere
__ForceUpdate: IsUnset,
pub fn maybe_force_update(
self,
value: Option<impl Into<Box<Option<i32>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::ForceUpdatewhere
__ForceUpdate: IsUnset,
Same as [Self::r#force_update
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn force_update(
self,
value: impl Into<Box<Option<i32>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::ForceUpdatewhere
__ForceUpdate: IsUnset,
pub fn force_update(
self,
value: impl Into<Box<Option<i32>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::ForceUpdatewhere
__ForceUpdate: IsUnset,
A counter that triggers an update even if no relevant parameters have been changed. See the spec.
sourcepub fn maybe_log_driver(
self,
value: Option<impl Into<Box<Option<ServiceTaskSpecLogDriver>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::LogDriverwhere
__LogDriver: IsUnset,
pub fn maybe_log_driver(
self,
value: Option<impl Into<Box<Option<ServiceTaskSpecLogDriver>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::LogDriverwhere
__LogDriver: IsUnset,
Same as [Self::r#log_driver
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn log_driver(
self,
value: impl Into<Box<Option<ServiceTaskSpecLogDriver>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::LogDriverwhere
__LogDriver: IsUnset,
pub fn log_driver(
self,
value: impl Into<Box<Option<ServiceTaskSpecLogDriver>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::LogDriverwhere
__LogDriver: IsUnset,
Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
sourcepub fn maybe_networks_advanceds(
self,
value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecNetworksAdvanced>>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::NetworksAdvancedswhere
__NetworksAdvanceds: IsUnset,
pub fn maybe_networks_advanceds(
self,
value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecNetworksAdvanced>>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::NetworksAdvancedswhere
__NetworksAdvanceds: IsUnset,
Same as [Self::r#networks_advanceds
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn networks_advanceds(
self,
value: impl Into<Box<Option<Vec<ServiceTaskSpecNetworksAdvanced>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::NetworksAdvancedswhere
__NetworksAdvanceds: IsUnset,
pub fn networks_advanceds(
self,
value: impl Into<Box<Option<Vec<ServiceTaskSpecNetworksAdvanced>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::NetworksAdvancedswhere
__NetworksAdvanceds: IsUnset,
The networks the container is attached to
sourcepub fn maybe_placement(
self,
value: Option<impl Into<Box<Option<ServiceTaskSpecPlacement>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::Placementwhere
__Placement: IsUnset,
pub fn maybe_placement(
self,
value: Option<impl Into<Box<Option<ServiceTaskSpecPlacement>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::Placementwhere
__Placement: IsUnset,
Same as [Self::r#placement
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn placement(
self,
value: impl Into<Box<Option<ServiceTaskSpecPlacement>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::Placementwhere
__Placement: IsUnset,
pub fn placement(
self,
value: impl Into<Box<Option<ServiceTaskSpecPlacement>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::Placementwhere
__Placement: IsUnset,
The placement preferences
sourcepub fn maybe_resources(
self,
value: Option<impl Into<Box<Option<ServiceTaskSpecResources>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::Resourceswhere
__Resources: IsUnset,
pub fn maybe_resources(
self,
value: Option<impl Into<Box<Option<ServiceTaskSpecResources>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::Resourceswhere
__Resources: IsUnset,
Same as [Self::r#resources
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn resources(
self,
value: impl Into<Box<Option<ServiceTaskSpecResources>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::Resourceswhere
__Resources: IsUnset,
pub fn resources(
self,
value: impl Into<Box<Option<ServiceTaskSpecResources>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::Resourceswhere
__Resources: IsUnset,
Resource requirements which apply to each individual container created as part of the service
sourcepub fn maybe_restart_policy(
self,
value: Option<impl Into<Box<Option<ServiceTaskSpecRestartPolicy>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::RestartPolicywhere
__RestartPolicy: IsUnset,
pub fn maybe_restart_policy(
self,
value: Option<impl Into<Box<Option<ServiceTaskSpecRestartPolicy>>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::RestartPolicywhere
__RestartPolicy: IsUnset,
Same as [Self::r#restart_policy
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn restart_policy(
self,
value: impl Into<Box<Option<ServiceTaskSpecRestartPolicy>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::RestartPolicywhere
__RestartPolicy: IsUnset,
pub fn restart_policy(
self,
value: impl Into<Box<Option<ServiceTaskSpecRestartPolicy>>>,
) -> <Self as __ServiceTaskSpecBuilderSetMember>::RestartPolicywhere
__RestartPolicy: IsUnset,
Specification for the restart policy which applies to containers created as part of this service.