pub struct Builder<W: Write> { /* private fields */ }
Expand description
Build a container in oci-archive format based on the OCI image spec
Implementations
sourceimpl<W: Write> Builder<W>
impl<W: Write> Builder<W>
pub fn new(writer: W) -> Self
sourcepub fn set_name(&mut self, name: &ImageName)
pub fn set_name(&mut self, name: &ImageName)
Set name of container, used in org.opencontainers.image.ref.name
tag.
If not set, a random name using UUID v4 hyphenated is set.
sourcepub fn set_created(&mut self, created: DateTime<Utc>)
pub fn set_created(&mut self, created: DateTime<Utc>)
Set created date time in UTC
sourcepub fn set_annotations(&mut self, annotations: Annotations)
pub fn set_annotations(&mut self, annotations: Annotations)
Set additional annotations
Set the name and/or email address of the person or entity which created and is responsible for maintaining the image.
sourcepub fn set_platform(&mut self, platform: &Platform)
pub fn set_platform(&mut self, platform: &Platform)
Set platform consists of architecture and OS info
sourcepub fn append_files(&mut self, ps: &[impl AsRef<Path>]) -> Result<()>
pub fn append_files(&mut self, ps: &[impl AsRef<Path>]) -> Result<()>
Append a files as a layer
sourcepub fn append_dir_all(&mut self, path: &Path) -> Result<()>
pub fn append_dir_all(&mut self, path: &Path) -> Result<()>
Append directory as a layer
pub fn into_inner(self) -> Result<W>
Trait Implementations
Auto Trait Implementations
impl<W> RefUnwindSafe for Builder<W> where
W: RefUnwindSafe,
impl<W> Send for Builder<W> where
W: Send,
impl<W> Sync for Builder<W> where
W: Sync,
impl<W> Unpin for Builder<W> where
W: Unpin,
impl<W> UnwindSafe for Builder<W> where
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more