pub struct BuildContext { /* private fields */ }Expand description
A build context: the files beside the Dockerfile in the artifact, sorted by name.
Sorted, so the entries’ order is a function of their names alone: the content hash and the zip see the same sequence whatever order the filesystem listed them in.
Implementations§
Source§impl BuildContext
impl BuildContext
Sourcepub fn from_entries(entries: Vec<ContextEntry>) -> Result<Self, Error>
pub fn from_entries(entries: Vec<ContextEntry>) -> Result<Self, Error>
A context from entries already in memory, sorted by name.
Each name must be a relative /-separated path of non-empty, non-., non-..
segments with no backslash, unique, and not agentd or Dockerfile at the root.
Sourcepub fn entries(&self) -> &[ContextEntry]
pub fn entries(&self) -> &[ContextEntry]
The entries, sorted by name.
Sourcepub fn with_warnings(self, warnings: Vec<String>) -> Self
pub fn with_warnings(self, warnings: Vec<String>) -> Self
The context with warnings recorded, one line each, for what reading its directory
skipped.
Sourcepub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
The bytes the entries carry, before compression.
Trait Implementations§
Source§impl Clone for BuildContext
impl Clone for BuildContext
Source§impl Debug for BuildContext
impl Debug for BuildContext
Source§impl Default for BuildContext
impl Default for BuildContext
impl Eq for BuildContext
Source§impl PartialEq for BuildContext
impl PartialEq for BuildContext
impl StructuralPartialEq for BuildContext
Auto Trait Implementations§
impl Freeze for BuildContext
impl RefUnwindSafe for BuildContext
impl Send for BuildContext
impl Sync for BuildContext
impl Unpin for BuildContext
impl UnsafeUnpin for BuildContext
impl UnwindSafe for BuildContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.