pub struct ValuesFile {
pub version: u32,
pub globals: Globals,
pub content_block: BTreeMap<String, ContentBlockValues>,
pub email_template: BTreeMap<String, EmailTemplateValues>,
}Expand description
Top-level values/<env>.yaml document.
Fields§
§version: u32§globals: Globals§content_block: BTreeMap<String, ContentBlockValues>§email_template: BTreeMap<String, EmailTemplateValues>Implementations§
Source§impl ValuesFile
Build a value: null skeleton with the same key + correlation
metadata as self. Used by templatize to pre-populate per-env
files for non-canonical envs (RFC §2.7 step 6).
impl ValuesFile
Build a value: null skeleton with the same key + correlation
metadata as self. Used by templatize to pre-populate per-env
files for non-canonical envs (RFC §2.7 step 6).
pub fn skeleton_clone(&self) -> ValuesFile
Source§impl ValuesFile
impl ValuesFile
Sourcepub fn load(path: &Path) -> Result<Self>
pub fn load(path: &Path) -> Result<Self>
Load and validate a values file from disk.
Errors:
- I/O failure →
Error::Io - YAML parse failure →
Error::YamlParse - Unsupported
versionor built-in shape violation →Error::InvalidFormat(RFC §5 Edge cases)
Sourcepub fn save(&self, path: &Path) -> Result<()>
pub fn save(&self, path: &Path) -> Result<()>
Serialize and atomically write to path (tmp + rename(2)).
Used by export (Phase 3) to write back updated values entries.
Note: this round-trips through serde_norway and therefore does
NOT preserve user comments or quoting style. Phase 3 accepts this
trade-off; a comment-preserving editor is out of scope for v0.14.
Trait Implementations§
Source§impl Clone for ValuesFile
impl Clone for ValuesFile
Source§fn clone(&self) -> ValuesFile
fn clone(&self) -> ValuesFile
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 ValuesFile
impl Debug for ValuesFile
Source§impl Default for ValuesFile
impl Default for ValuesFile
Source§fn default() -> ValuesFile
fn default() -> ValuesFile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ValuesFile
impl<'de> Deserialize<'de> for ValuesFile
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
Auto Trait Implementations§
impl Freeze for ValuesFile
impl RefUnwindSafe for ValuesFile
impl Send for ValuesFile
impl Sync for ValuesFile
impl Unpin for ValuesFile
impl UnsafeUnpin for ValuesFile
impl UnwindSafe for ValuesFile
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