Struct SystemdUnitsOptsBuilder

Source
pub struct SystemdUnitsOptsBuilder { /* private fields */ }
Expand description

A builder struct for SystemdUnitsOpts.

Implementations§

Source§

impl SystemdUnitsOptsBuilder

Source

pub fn build(self) -> SystemdUnitsOpts

Finish building SystemdUnitsOpts.

Source§

impl SystemdUnitsOptsBuilder

Source

pub fn additional_env_variables<S>( self, additional_env_variables: impl IntoIterator<Item = S>, ) -> Self
where S: Into<String>,

Set environment variables to the systemd unit files.

Source

pub fn after<S>(self, after: impl IntoIterator<Item = S>) -> Self
where S: Into<String>,

Systemd After list for the container or pods.

Source

pub fn container_prefix(self, container_prefix: impl Into<String>) -> Self

Systemd unit name prefix for containers.

Source

pub fn new(self, new: bool) -> Self

Create a new container instead of starting an existing one.

Source

pub fn no_header(self, no_header: bool) -> Self

Do not generate the header including the Podman version and the timestamp.

Source

pub fn pod_prefix(self, pod_prefix: impl Into<String>) -> Self

Systemd unit name prefix for pods.

Source

pub fn requires<S>(self, requires: impl IntoIterator<Item = S>) -> Self
where S: Into<String>,

Systemd Requires list for the container or pods.

Source

pub fn restart_policy(self, restart_policy: SystemdRestartPolicy) -> Self

Systemd restart-policy.

Source

pub fn restart_sec(self, restart_sec: usize) -> Self

Configures the time to sleep before restarting a service.

Source

pub fn separator(self, separator: impl Into<String>) -> Self

Systemd unit name separator between name/id and prefix.

Source

pub fn start_timeout(self, start_timeout: usize) -> Self

Start timeout in seconds.

Source

pub fn stop_timeout(self, stop_timeout: usize) -> Self

Stop timeout in seconds.

Source

pub fn use_name(self, use_name: bool) -> Self

Use container/pod names instead of IDs.

Source

pub fn wants<S>(self, wants: impl IntoIterator<Item = S>) -> Self
where S: Into<String>,

Systemd Wants list for the container or pods.

Trait Implementations§

Source§

impl Clone for SystemdUnitsOptsBuilder

Source§

fn clone(&self) -> SystemdUnitsOptsBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SystemdUnitsOptsBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SystemdUnitsOptsBuilder

Source§

fn default() -> SystemdUnitsOptsBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

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 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.
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
Source§

impl<T> ErasedDestructor for T
where T: 'static,