pub struct BuildDefinition { /* private fields */ }Expand description
A long-syntax build definition.
Implementations§
Source§impl BuildDefinition
impl BuildDefinition
Sourcepub const fn span(&self) -> SourceSpan
pub const fn span(&self) -> SourceSpan
Returns the complete mapping span. Returns the complete update-config mapping span. Returns the complete update-config mapping span. Returns the complete update-config mapping span.
Sourcepub const fn context(&self) -> Option<&Located<String>>
pub const fn context(&self) -> Option<&Located<String>>
Returns the explicitly authored long-syntax build context when it is a string scalar.
Other build subfields remain source-addressable references and are not semantically interpreted by this model. Returns the raw update parallelism scalar.
Sourcepub const fn additional_contexts(&self) -> Option<&BuildAdditionalContexts>
pub const fn additional_contexts(&self) -> Option<&BuildAdditionalContexts>
Returns authored additional build contexts without normalizing mapping and list syntax.
List entries remain raw ordered strings, including duplicates and NAME=VALUE spelling.
Mapping entries retain scalar kinds and authored order. This model does not interpret
names, paths, URLs, images, service schemes, or builder behavior.
Returns the raw update delay string.
Sourcepub fn entitlements(&self) -> Option<&[Located<String>]>
pub fn entitlements(&self) -> Option<&[Located<String>]>
Returns authored build entitlements in order as opaque raw strings.
Explicit emptiness remains distinct from omission. This model retains duplicates and does
not infer entitlement allowlists, privilege state, BuildKit or platform support, build
execution, or runtime effect.
Returns the raw update monitor string.
Sourcepub const fn extra_hosts(&self) -> Option<&BuildExtraHosts>
pub const fn extra_hosts(&self) -> Option<&BuildExtraHosts>
Returns authored build-time host mappings without using service extra_hosts semantics.
List entries retain raw =/: spelling, IPv4/IPv6 brackets, host-gateway, and unknown
values. Mapping values retain either a scalar string or ordered string list; no address
normalization, validation, DNS lookup, host inspection, or build behavior is performed.
Returns the raw update failure-action string.
Sourcepub const fn args(&self) -> Option<&BuildArgs>
pub const fn args(&self) -> Option<&BuildArgs>
Returns explicitly authored build arguments without normalizing mapping and list syntax.
Mapping entries retain their string, number, boolean, or null scalar kinds. List entries remain raw ordered strings, including duplicates and bare argument names. Returns the raw update maximum-failure-ratio scalar.
Sourcepub fn cache_from(&self) -> Option<&[Located<String>]>
pub fn cache_from(&self) -> Option<&[Located<String>]>
Returns authored external build-cache sources in order.
An explicit empty sequence remains distinct from omission. Entries are raw string scalars; this model preserves duplicates and does not parse cache type, reference, source, path, image, credentials, or builder behavior. Returns the update order.
Sourcepub fn cache_to(&self) -> Option<&[Located<String>]>
pub fn cache_to(&self) -> Option<&[Located<String>]>
Returns authored external build-cache destinations in order.
An explicit empty sequence remains distinct from omission. Entries are raw string scalars; this model preserves duplicates and does not parse cache type, reference, destination, path, image, credentials, or builder behavior. Returns retained update-config extensions.
Sourcepub const fn dockerfile(&self) -> Option<&Located<String>>
pub const fn dockerfile(&self) -> Option<&Located<String>>
Returns the explicitly authored long-syntax Dockerfile when it is a non-empty scalar.
Other build subfields remain source-addressable references and are not semantically interpreted by this model. Returns retained update-config malformed or unknown fields.
Sourcepub const fn dockerfile_inline(&self) -> Option<&Located<String>>
pub const fn dockerfile_inline(&self) -> Option<&Located<String>>
Returns the authored inline Dockerfile as an exact string scalar.
Empty and multiline content remains distinct from omission. ComposeLens does not parse
Containerfile syntax, resolve paths or contexts, scan content for secrets, build images,
or infer Docker, BuildKit, or runtime behavior.
Sourcepub const fn target(&self) -> Option<&Located<String>>
pub const fn target(&self) -> Option<&Located<String>>
Returns the explicitly authored long-syntax build target as an opaque scalar.
An empty scalar remains an authored target; this model does not infer stage-name grammar.
Sourcepub fn network(&self) -> Option<&Located<String>>
pub fn network(&self) -> Option<&Located<String>>
Returns the explicitly authored long-syntax build network as an opaque scalar.
An empty scalar remains authored; this model does not infer network names, defaults, or runtime behavior.
Sourcepub fn isolation(&self) -> Option<&Located<String>>
pub fn isolation(&self) -> Option<&Located<String>>
Returns the explicitly authored long-syntax build isolation as an opaque YAML string.
This model preserves only YAML string scalars and does not validate isolation modes,
platforms, defaults, privileges, or BUILDAH_ISOLATION behavior. It is unrelated to the
service-level isolation field.
Sourcepub fn platforms(&self) -> Option<&[Located<String>]>
pub fn platforms(&self) -> Option<&[Located<String>]>
Returns explicitly authored build platforms in order.
An explicit empty sequence remains distinct from omission. Platforms are raw scalar values; this model does not parse OCI platform grammar or validate availability.
Sourcepub fn no_cache(&self) -> Option<&Located<BuildNoCache>>
pub fn no_cache(&self) -> Option<&Located<BuildNoCache>>
Returns the explicitly authored build cache-disable choice with YAML scalar type retained.
Omission does not imply a default. String values, including empty and interpolation-shaped strings, are not coerced or resolved as booleans; this model does not infer builder or cache behavior.
Sourcepub const fn no_cache_filter(&self) -> Option<&BuildNoCacheFilter>
pub const fn no_cache_filter(&self) -> Option<&BuildNoCacheFilter>
Returns raw no-cache filter scalar or list syntax.
Sourcepub fn privileged(&self) -> Option<&Located<BooleanValue>>
pub fn privileged(&self) -> Option<&Located<BooleanValue>>
Returns the explicit build privileged boolean or deferred expression.
Sourcepub fn sbom(&self) -> Option<&Located<BuildSbom>>
pub fn sbom(&self) -> Option<&Located<BuildSbom>>
Returns the explicitly authored build SBOM choice with YAML scalar type retained.
Omission does not imply a default. String values, including empty, generator-shaped, and interpolation-shaped strings, are not coerced or interpreted; this model does not generate an SBOM or infer builder behavior.
Sourcepub fn provenance(&self) -> Option<&Located<BuildProvenance>>
pub fn provenance(&self) -> Option<&Located<BuildProvenance>>
Returns authored Build provenance as a boolean or opaque string scalar.
Sourcepub fn pull(&self) -> Option<&Located<BooleanValue>>
pub fn pull(&self) -> Option<&Located<BooleanValue>>
Returns whether this build should pull referenced images before building.
A literal boolean and a deferred interpolation expression remain distinct. Omission is not treated as an implicit default, and this model does not resolve expressions or infer build execution behavior.
Sourcepub fn shm_size(&self) -> Option<&ShmSize>
pub fn shm_size(&self) -> Option<&ShmSize>
Returns the explicitly authored build-container shared-memory size.
This retains the same YAML number/string spelling, documented lowercase-unit
classification, lexical-zero, deferred-expression, and provider-dependent states as
service shm_size. Omission does not infer a builder default, allocation, host setting,
or runtime behavior.
Returns explicitly authored additional build tags in order.
An explicit empty sequence remains distinct from omission. Tags are opaque scalar values; this model does not apply image-reference grammar or duplicate handling.
Sourcepub fn labels(&self) -> Option<&Labels>
pub fn labels(&self) -> Option<&Labels>
Returns explicitly authored build labels without normalizing mapping and list syntax.
List entries remain ordered raw strings, including duplicates and bare labels. Mapping entries retain their scalar kinds and authored order.
Sourcepub fn secrets(&self) -> Option<&[SecretGrant]>
pub fn secrets(&self) -> Option<&[SecretGrant]>
Returns explicitly authored build secret grants in order.
Short resource-name and long mapping syntax remain distinct. An explicit empty sequence, duplicate entries, raw scalar spellings, and unknown long-form fields are retained; this model neither resolves top-level secrets nor materializes secret contents.
Sourcepub const fn ssh(&self) -> Option<&BuildSsh>
pub const fn ssh(&self) -> Option<&BuildSsh>
Returns authored BuildKit SSH grants without normalizing mapping and list syntax.
SSH identifiers, paths, agent sockets, and material are opaque sensitive data. This model neither parses them nor accesses the host, an agent, a socket, or a build runtime.
Sourcepub fn ulimits(&self) -> Option<&Ulimits>
pub fn ulimits(&self) -> Option<&Ulimits>
Returns explicitly authored build-container resource limits.
The same single and soft/hard range forms as service ulimits are retained. This model
does not inject defaults, normalize unlimited values, validate host limits, or infer
builder or runtime behavior.
Sourcepub fn fields(&self) -> &[BuildField]
pub fn fields(&self) -> &[BuildField]
Returns recognized build fields in authored order.
Sourcepub fn field(&self, kind: BuildFieldKind) -> Option<&BuildField>
pub fn field(&self, kind: BuildFieldKind) -> Option<&BuildField>
Finds the first recognized field of the requested kind.
Sourcepub fn extension_fields(&self) -> &[FieldReference]
pub fn extension_fields(&self) -> &[FieldReference]
Returns retained x- fields.
Sourcepub fn unknown_fields(&self) -> &[FieldReference]
pub fn unknown_fields(&self) -> &[FieldReference]
Returns fields not recognized by this release.
Trait Implementations§
Source§impl Clone for BuildDefinition
impl Clone for BuildDefinition
Source§fn clone(&self) -> BuildDefinition
fn clone(&self) -> BuildDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more