pub struct DockerContext {
pub rust_channel: String,
pub has_frontend: bool,
pub bins: Vec<String>,
pub web_bin: String,
pub copy_dirs_present: Vec<String>,
pub runtime_apt: Vec<String>,
}Expand description
Inputs the Dockerfile renderer needs. All fields come from the project
(rust-toolchain.toml, Cargo.toml, on-disk dirs, deploy metadata) and are
fully resolved by the caller — render_dockerfile itself does no I/O.
Fields§
§rust_channel: StringRust release channel — e.g. “stable”, “1.90.0”.
has_frontend: boolWhether frontend/package.json exists in the project root.
bins: Vec<String>All [[bin]] names declared in the project Cargo.toml.
Callers obtain bin entries via crate::project::read_bins (which
returns Vec<BinEntry>) and convert to names at the call site:
bins: read_bins(root).into_iter().map(|b| b.name).collect().
The renderer only needs names; keeping this field as Vec<String>
preserves the “pure render” boundary (no project-module types leak into
the template module).
web_bin: StringResolved web bin name (D-02). Used for the runtime ENTRYPOINT.
copy_dirs_present: Vec<String>metadata.copy_dirs filtered down to dirs that actually exist.
runtime_apt: Vec<String>Verbatim metadata.runtime_apt.
Trait Implementations§
Source§impl Clone for DockerContext
impl Clone for DockerContext
Source§fn clone(&self) -> DockerContext
fn clone(&self) -> DockerContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DockerContext
impl RefUnwindSafe for DockerContext
impl Send for DockerContext
impl Sync for DockerContext
impl Unpin for DockerContext
impl UnsafeUnpin for DockerContext
impl UnwindSafe for DockerContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 more