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<BuildContext, Error>
pub fn from_entries(entries: Vec<ContextEntry>) -> Result<BuildContext, 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>) -> BuildContext
pub fn with_warnings(self, warnings: Vec<String>) -> BuildContext
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 BuildContextExt for BuildContext
impl BuildContextExt for BuildContext
Source§impl Clone for BuildContext
impl Clone for BuildContext
Source§fn clone(&self) -> BuildContext
fn clone(&self) -> BuildContext
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 BuildContext
impl Debug for BuildContext
Source§impl Default for BuildContext
impl Default for BuildContext
Source§fn default() -> BuildContext
fn default() -> BuildContext
Returns the “default value” for a type. Read more
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.