#[non_exhaustive]pub enum BuildSourceDeclaration {
Scalar(ProtectedString),
Structured(Vec<Sourced<SourceBuildSetting>>),
}Expand description
One source declaration for an image build.
A scalar context is not silently expanded into a structured declaration. Structured declarations retain field order, duplicate fields, and explicitly present empty per-key collections.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Scalar(ProtectedString)
Short scalar context syntax.
Structured(Vec<Sourced<SourceBuildSetting>>)
Structured declaration syntax.
Implementations§
Source§impl BuildSourceDeclaration
impl BuildSourceDeclaration
Sourcepub const fn syntax(&self) -> BuildSyntax
pub const fn syntax(&self) -> BuildSyntax
Returns the preserved source syntax family.
Sourcepub fn structured_settings(&self) -> Option<&[Sourced<SourceBuildSetting>]>
pub fn structured_settings(&self) -> Option<&[Sourced<SourceBuildSetting>]>
Returns structured settings in source order when this is a structured declaration.
Trait Implementations§
Source§impl Clone for BuildSourceDeclaration
impl Clone for BuildSourceDeclaration
Source§fn clone(&self) -> BuildSourceDeclaration
fn clone(&self) -> BuildSourceDeclaration
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 BuildSourceDeclaration
impl Debug for BuildSourceDeclaration
impl Eq for BuildSourceDeclaration
Source§impl PartialEq for BuildSourceDeclaration
impl PartialEq for BuildSourceDeclaration
impl StructuralPartialEq for BuildSourceDeclaration
Auto Trait Implementations§
impl Freeze for BuildSourceDeclaration
impl RefUnwindSafe for BuildSourceDeclaration
impl Send for BuildSourceDeclaration
impl Sync for BuildSourceDeclaration
impl Unpin for BuildSourceDeclaration
impl UnsafeUnpin for BuildSourceDeclaration
impl UnwindSafe for BuildSourceDeclaration
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