pub struct ProjectFile {
pub schema_version: SchemaVersion,
pub project: String,
pub environments: Vec<String>,
}Expand description
The parsed deploy/project.yaml (D-08, V9).
Fields§
§schema_version: SchemaVersionAlways 1; any other value is refused by SchemaVersion.
project: StringThe project’s name on the gateway. project.json holds only a display
title, so the name cannot come from there. It is a path segment on
the gateway host, so it must be one safe component on both systems.
environments: Vec<String>The environments (targets/<ENV>.yaml) this project deploys to.
Implementations§
Source§impl ProjectFile
impl ProjectFile
Sourcepub fn parse(file: &str, bytes: &[u8]) -> Result<ProjectFile, CoreError>
pub fn parse(file: &str, bytes: &[u8]) -> Result<ProjectFile, CoreError>
Parse and validate bytes (labelled file in errors). Every semantic
defect is collected into ONE deploy_tree_invalid.
Sourcepub fn require_env(&self, env: &str) -> Result<(), CoreError>
pub fn require_env(&self, env: &str) -> Result<(), CoreError>
Refuse an environment the file does not list (deploy_tree_invalid
naming PROJECT_FILE_REL).
Trait Implementations§
Source§impl Clone for ProjectFile
impl Clone for ProjectFile
Source§impl Debug for ProjectFile
impl Debug for ProjectFile
Source§impl<'de> Deserialize<'de> for ProjectFile
impl<'de> Deserialize<'de> for ProjectFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProjectFile
impl PartialEq for ProjectFile
impl StructuralPartialEq for ProjectFile
Auto Trait Implementations§
impl Freeze for ProjectFile
impl RefUnwindSafe for ProjectFile
impl Send for ProjectFile
impl Sync for ProjectFile
impl Unpin for ProjectFile
impl UnsafeUnpin for ProjectFile
impl UnwindSafe for ProjectFile
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