pub struct ComposeBuild { /* private fields */ }Expand description
Docker Compose build metadata.
Implementations§
Source§impl ComposeBuild
impl ComposeBuild
Sourcepub fn new(context: impl AsRef<str>) -> Result<Self, ComposeTextError>
pub fn new(context: impl AsRef<str>) -> Result<Self, ComposeTextError>
Creates build metadata with a context path.
Sourcepub fn with_dockerfile(self, dockerfile: impl Into<String>) -> Self
pub fn with_dockerfile(self, dockerfile: impl Into<String>) -> Self
Adds a Dockerfile path.
Sourcepub fn with_target(self, target: impl Into<String>) -> Self
pub fn with_target(self, target: impl Into<String>) -> Self
Adds a target stage.
Sourcepub fn with_arg(
self,
key: impl AsRef<str>,
value: impl Into<String>,
) -> Result<Self, ComposeTextError>
pub fn with_arg( self, key: impl AsRef<str>, value: impl Into<String>, ) -> Result<Self, ComposeTextError>
Adds a build argument.
Sourcepub fn dockerfile(&self) -> Option<&str>
pub fn dockerfile(&self) -> Option<&str>
Returns the optional Dockerfile path.
Trait Implementations§
Source§impl Clone for ComposeBuild
impl Clone for ComposeBuild
Source§fn clone(&self) -> ComposeBuild
fn clone(&self) -> ComposeBuild
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComposeBuild
impl Debug for ComposeBuild
Source§impl PartialEq for ComposeBuild
impl PartialEq for ComposeBuild
Source§fn eq(&self, other: &ComposeBuild) -> bool
fn eq(&self, other: &ComposeBuild) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ComposeBuild
impl StructuralPartialEq for ComposeBuild
Auto Trait Implementations§
impl Freeze for ComposeBuild
impl RefUnwindSafe for ComposeBuild
impl Send for ComposeBuild
impl Sync for ComposeBuild
impl Unpin for ComposeBuild
impl UnsafeUnpin for ComposeBuild
impl UnwindSafe for ComposeBuild
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