#[non_exhaustive]pub enum GeneratedEnvironmentFile {
Short(GeneratedString),
Long {
path: GeneratedString,
required: Option<bool>,
format: Option<GeneratedEnvironmentFileFormat>,
},
}Expand description
One ordered generated Compose env_file declaration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Short(GeneratedString)
Scalar path syntax with Compose defaults.
Long
Mapping syntax with independently selected options.
Fields
path: GeneratedStringEnvironment-file path.
format: Option<GeneratedEnvironmentFileFormat>Explicit parser mode, or source-format default when omitted.
Implementations§
Source§impl GeneratedEnvironmentFile
impl GeneratedEnvironmentFile
Sourcepub fn short(path: GeneratedString) -> Result<Self, GenerationError>
pub fn short(path: GeneratedString) -> Result<Self, GenerationError>
Creates one scalar short-syntax declaration.
§Errors
Returns GenerationError::EmptyValue for an empty path. NUL-bearing paths are rejected
while constructing GeneratedString.
Sourcepub fn long(
path: GeneratedString,
required: Option<bool>,
format: Option<GeneratedEnvironmentFileFormat>,
) -> Result<Self, GenerationError>
pub fn long( path: GeneratedString, required: Option<bool>, format: Option<GeneratedEnvironmentFileFormat>, ) -> Result<Self, GenerationError>
Creates one mapping long-syntax declaration.
§Errors
Returns GenerationError::EmptyValue for an empty path. NUL-bearing paths are rejected
while constructing GeneratedString.
Sourcepub const fn path(&self) -> &GeneratedString
pub const fn path(&self) -> &GeneratedString
Returns the environment-file path through its explicit sensitivity boundary.
Sourcepub const fn required(&self) -> Option<bool>
pub const fn required(&self) -> Option<bool>
Returns the explicitly selected required/optional behavior for long syntax.
Sourcepub const fn format(&self) -> Option<GeneratedEnvironmentFileFormat>
pub const fn format(&self) -> Option<GeneratedEnvironmentFileFormat>
Returns the explicitly selected parser mode for long syntax.
Sourcepub const fn is_sensitive(&self) -> bool
pub const fn is_sensitive(&self) -> bool
Reports whether debug output must redact this declaration’s path.
Trait Implementations§
Source§impl Clone for GeneratedEnvironmentFile
impl Clone for GeneratedEnvironmentFile
Source§fn clone(&self) -> GeneratedEnvironmentFile
fn clone(&self) -> GeneratedEnvironmentFile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more