From a5d0cd7a745647e6d050799b065fa5016d87108f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 9 Nov 2019 17:26:14 +0100 Subject: Rewrite parts of the Header format section Signed-off-by: Matthias Beyer --- doc/src/02000-store.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/src/02000-store.md b/doc/src/02000-store.md index 07334cea..495ae48a 100644 --- a/doc/src/02000-store.md +++ b/doc/src/02000-store.md @@ -42,21 +42,22 @@ The following section describe their purpose. The header format is where imag stores its data. The header is an area at the top of every file which is seperated from the content part by three dashes (`---`). Between these three dashes there is structured data. imag uses `TOML` -as data format for this structured data, because it fits best and the available -`TOML` parser for the rust programming language is really good. +as data format for this structured data. The header can contain any amount of data, but modules (see @sec:modules) are -restricted in their way of altering the data. +restricted (by convention) in their way of altering the data. -So normally there are several sections in the header. One section (`[imag]`) is -always present. It contains a `version` field, which tells imag which version -this file was created with. +Normally there are several sections in the header. One section (`[imag]`) is +always present, it is automatically created by the store and contains a +`version` field, which tells imag which version this file was created with. +The store automatically verifies that it is compatible (satisfying semver) with +the version of imag an entry was created with, and if it is not, it fails +loading the entry. Other sections are named like the modules which created them. Every module is allowed to store arbitrary data under its own section and a module may never -read other sections than its own. +read or write other sections than its own. -These conventions are not enforced by imag itself, though. ### Content Format {#sec:thestore:fileformat:content} -- cgit v1.2.3