Struct DockerFile

Source
pub struct DockerFile<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> DockerFile<'a>

Source

pub fn new() -> Self

Source

pub fn from_image(from: &'a str) -> Self

Source

pub fn add(self, name: &'a str, val: DockerFieldType<'a>) -> Self

Source

pub fn comment(self, cmt: &'a str) -> Self

Source

pub fn from(self, from: &'a str) -> Self

Source

pub fn from_alias(self, alias: &'a str, from: &'a str) -> Self

Source

pub fn run(self, from: &'a str) -> Self

Source

pub fn cmd(self, args: &'a [&'a str]) -> Self

Source

pub fn label(self, labels: &'a [(&'a str, &'a str)]) -> Self

Source

pub fn expose(self, port: i32) -> Self

Source

pub fn expose_protocal(self, port: i32, prot: &'a str) -> Self

Source

pub fn env(self, vals: &'a [(&'a str, &'a str)]) -> Self

Source

pub fn workdir(self, dir: &'a str) -> Self

Source

pub fn copy(self, src: &'a str, dest: &'a str) -> Self

Source

pub fn copy_from(self, from: &'a str, src: &'a str, dest: &'a str) -> Self

Source

pub fn volume(self, vols: &'a [&'a str]) -> Self

Source

pub fn dockerfile(self, f: DockerFile<'a>) -> Self

Source

pub fn entrypoint(self, args: &'a [&'a str]) -> Self

Source

pub fn newline(self) -> Self

Source

pub fn newlines(self, ammount: i32) -> Self

Source

pub fn to_string(&self) -> String

Trait Implementations§

Source§

impl<'a> Default for DockerFile<'a>

Source§

fn default() -> Self

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

impl<'a> From<DockerFile<'a>> for DockerFieldType<'a>

Source§

fn from(value: DockerFile<'a>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for DockerFile<'a>

§

impl<'a> RefUnwindSafe for DockerFile<'a>

§

impl<'a> Send for DockerFile<'a>

§

impl<'a> Sync for DockerFile<'a>

§

impl<'a> Unpin for DockerFile<'a>

§

impl<'a> UnwindSafe for DockerFile<'a>

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

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.