pub enum IdStorage {
Registry,
Frontmatter,
FrontmatterOnly,
}Expand description
Where a document’s stable ID is persisted — the identity-storage axis
(DESIGN §5). Orthogonal to when an ID is minted (prov’s Registration) and to
how references are spelled; this is purely the ID’s home.
Variants§
Registry
Registry only (registry): IDs live solely in the registry document —
authoritative, non-derivable, resolved by direct lookup. The cleanest
documents (no id clutter), but identity does not travel with a file.
Frontmatter
Frontmatter + registry (both, the default): each document also
carries its own ID in an id frontmatter field (a portable, self-describing
shadow), and the registry is retained as a rebuildable cache + tombstone
ledger. The ID travels with the file across copies and out-of-band moves.
FrontmatterOnly
Frontmatter only (frontmatter): the id field is the sole home; no
registry document is written and resolution rebuilds the id→path map by
scanning frontmatter. Maximally self-describing, but it forfeits tombstones
(a deleted file takes its ID with it), so an ID can in principle be reminted.
Implementations§
Source§impl IdStorage
impl IdStorage
Sourcepub fn stamps_frontmatter(self) -> bool
pub fn stamps_frontmatter(self) -> bool
Whether this mode writes the ID into each document’s id frontmatter.
Sourcepub fn keeps_registry(self) -> bool
pub fn keeps_registry(self) -> bool
Whether this mode keeps a registry document (the authoritative store, or —
under Frontmatter — a rebuildable cache).
Sourcepub fn from_config_str(value: &str) -> Option<Self>
pub fn from_config_str(value: &str) -> Option<Self>
Parse the id_storage config spelling; unknown → None. both is the
frontmatter+registry default; frontmatter is the registry-less mode.
Sourcepub fn as_config_str(self) -> &'static str
pub fn as_config_str(self) -> &'static str
The id_storage config spelling.
Trait Implementations§
impl Copy for IdStorage
impl Eq for IdStorage
impl StructuralPartialEq for IdStorage
Auto Trait Implementations§
impl Freeze for IdStorage
impl RefUnwindSafe for IdStorage
impl Send for IdStorage
impl Sync for IdStorage
impl Unpin for IdStorage
impl UnsafeUnpin for IdStorage
impl UnwindSafe for IdStorage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.