pub struct TemplateBuilder { /* private fields */ }
Expand description
Builder for creating custom templates
Implementations§
Source§impl TemplateBuilder
impl TemplateBuilder
Sourcepub fn new(name: impl Into<String>, image: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, image: impl Into<String>) -> Self
Create a new template builder
Sourcepub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add an environment variable
Sourcepub fn volume(
self,
source: impl Into<String>,
target: impl Into<String>,
) -> Self
pub fn volume( self, source: impl Into<String>, target: impl Into<String>, ) -> Self
Add a volume mount
Sourcepub fn volume_ro(
self,
source: impl Into<String>,
target: impl Into<String>,
) -> Self
pub fn volume_ro( self, source: impl Into<String>, target: impl Into<String>, ) -> Self
Add a read-only volume mount
Sourcepub fn auto_remove(self) -> Self
pub fn auto_remove(self) -> Self
Enable auto-remove
Sourcepub fn memory_limit(self, limit: impl Into<String>) -> Self
pub fn memory_limit(self, limit: impl Into<String>) -> Self
Set memory limit
Sourcepub fn build(self) -> CustomTemplate
pub fn build(self) -> CustomTemplate
Build into a custom template
Auto Trait Implementations§
impl Freeze for TemplateBuilder
impl RefUnwindSafe for TemplateBuilder
impl Send for TemplateBuilder
impl Sync for TemplateBuilder
impl Unpin for TemplateBuilder
impl UnwindSafe for TemplateBuilder
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