pub struct SystemdUnitsOptsBuilder { /* private fields */ }
Expand description
A builder struct for SystemdUnitsOpts.
Implementations§
Source§impl SystemdUnitsOptsBuilder
impl SystemdUnitsOptsBuilder
Sourcepub fn build(self) -> SystemdUnitsOpts
pub fn build(self) -> SystemdUnitsOpts
Finish building SystemdUnitsOpts.
Source§impl SystemdUnitsOptsBuilder
impl SystemdUnitsOptsBuilder
Sourcepub fn additional_env_variables<S>(
self,
additional_env_variables: impl IntoIterator<Item = S>,
) -> Self
pub fn additional_env_variables<S>( self, additional_env_variables: impl IntoIterator<Item = S>, ) -> Self
Set environment variables to the systemd unit files.
Sourcepub fn after<S>(self, after: impl IntoIterator<Item = S>) -> Self
pub fn after<S>(self, after: impl IntoIterator<Item = S>) -> Self
Systemd After list for the container or pods.
Sourcepub fn container_prefix(self, container_prefix: impl Into<String>) -> Self
pub fn container_prefix(self, container_prefix: impl Into<String>) -> Self
Systemd unit name prefix for containers.
Sourcepub fn new(self, new: bool) -> Self
pub fn new(self, new: bool) -> Self
Create a new container instead of starting an existing one.
Sourcepub fn no_header(self, no_header: bool) -> Self
pub fn no_header(self, no_header: bool) -> Self
Do not generate the header including the Podman version and the timestamp.
Sourcepub fn pod_prefix(self, pod_prefix: impl Into<String>) -> Self
pub fn pod_prefix(self, pod_prefix: impl Into<String>) -> Self
Systemd unit name prefix for pods.
Sourcepub fn requires<S>(self, requires: impl IntoIterator<Item = S>) -> Self
pub fn requires<S>(self, requires: impl IntoIterator<Item = S>) -> Self
Systemd Requires list for the container or pods.
Sourcepub fn restart_policy(self, restart_policy: SystemdRestartPolicy) -> Self
pub fn restart_policy(self, restart_policy: SystemdRestartPolicy) -> Self
Systemd restart-policy.
Sourcepub fn restart_sec(self, restart_sec: usize) -> Self
pub fn restart_sec(self, restart_sec: usize) -> Self
Configures the time to sleep before restarting a service.
Sourcepub fn separator(self, separator: impl Into<String>) -> Self
pub fn separator(self, separator: impl Into<String>) -> Self
Systemd unit name separator between name/id and prefix.
Sourcepub fn start_timeout(self, start_timeout: usize) -> Self
pub fn start_timeout(self, start_timeout: usize) -> Self
Start timeout in seconds.
Sourcepub fn stop_timeout(self, stop_timeout: usize) -> Self
pub fn stop_timeout(self, stop_timeout: usize) -> Self
Stop timeout in seconds.
Sourcepub fn wants<S>(self, wants: impl IntoIterator<Item = S>) -> Self
pub fn wants<S>(self, wants: impl IntoIterator<Item = S>) -> Self
Systemd Wants list for the container or pods.
Trait Implementations§
Source§impl Clone for SystemdUnitsOptsBuilder
impl Clone for SystemdUnitsOptsBuilder
Source§fn clone(&self) -> SystemdUnitsOptsBuilder
fn clone(&self) -> SystemdUnitsOptsBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SystemdUnitsOptsBuilder
impl Debug for SystemdUnitsOptsBuilder
Source§impl Default for SystemdUnitsOptsBuilder
impl Default for SystemdUnitsOptsBuilder
Source§fn default() -> SystemdUnitsOptsBuilder
fn default() -> SystemdUnitsOptsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SystemdUnitsOptsBuilder
impl RefUnwindSafe for SystemdUnitsOptsBuilder
impl Send for SystemdUnitsOptsBuilder
impl Sync for SystemdUnitsOptsBuilder
impl Unpin for SystemdUnitsOptsBuilder
impl UnwindSafe for SystemdUnitsOptsBuilder
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