pub struct WorkspaceBuilder<FS, Id, Ix> { /* private fields */ }Expand description
Implementations§
Source§impl<FS, Id, Ix> WorkspaceBuilder<FS, Id, Ix>
impl<FS, Id, Ix> WorkspaceBuilder<FS, Id, Ix>
Sourcepub fn relations(self, relations: RelationSet) -> Self
pub fn relations(self, relations: RelationSet) -> Self
Set the relation vocabulary.
Sourcepub fn link_style(self, link_style: LinkStyle) -> Self
pub fn link_style(self, link_style: LinkStyle) -> Self
Set the link style this workspace authors in (typically read from the
root’s link_format).
Sourcepub fn id_links(self, id_links: bool) -> Self
pub fn id_links(self, id_links: bool) -> Self
Author durable structural links by id (Obsidian-style) rather than paths.
A convenience over reference_style; effective
only when identity registers on a link.
Sourcepub fn fixity(self, fixity: Fixity) -> Self
pub fn fixity(self, fixity: Fixity) -> Self
Set how far content checksums are recorded (attachments only by default).
Sourcepub fn record_deletions(self, record_deletions: bool) -> Self
pub fn record_deletions(self, record_deletions: bool) -> Self
Set whether a delete records what it destroyed (on by default) — see
Workspace::record_deletions.
Sourcepub fn embed_style(self, embed_style: EmbedStyle) -> Self
pub fn embed_style(self, embed_style: EmbedStyle) -> Self
Set the metadata embedding family — the (style, format) half that
resolves to a concrete carrier. Defaults to
EmbedStyle::Delimited, matching the config default.
Sourcepub fn id_storage(self, id_storage: IdStorage) -> Self
pub fn id_storage(self, id_storage: IdStorage) -> Self
Set where a document’s stable id is persisted (DESIGN §5). Under a
frontmatter-stamping mode (IdStorage::stamps_frontmatter) every
document prov authors carries its own id, so identity travels with the
file and the registry becomes a rebuildable cache rather than the sole
authority.
Sourcepub fn workspace_id(self, name: impl Into<String>) -> Self
pub fn workspace_id(self, name: impl Into<String>) -> Self
Set what this workspace calls itself — the qualifier a cross-workspace
reference (id:<name>/<id>) names it by. Empty (the default) leaves the
workspace anonymous: it can hold foreign references, but a reference
written to it can never be recognized here as local.
Sourcepub fn out_of_scope(self, dirs: impl IntoIterator<Item = PathBuf>) -> Self
pub fn out_of_scope(self, dirs: impl IntoIterator<Item = PathBuf>) -> Self
Declare directories that are on disk beside the workspace but are not
the workspace — see
Workspace::out_of_scope. Each is
workspace-relative; anything absolute or reaching outside is the
caller’s error to avoid, since a builder has no config document to file
a ConfigIssue against.
Sourcepub fn reference_style(self, style: ReferenceStyle) -> Self
pub fn reference_style(self, style: ReferenceStyle) -> Self
Set the workspace-default reference style — the fallback for relations
without their own override. Supersedes the link_style/id_links
convenience inputs when set.
Sourcepub fn default_embed_format(self, format: Format) -> Self
pub fn default_embed_format(self, format: Format) -> Self
Set the metadata format new documents get when they inherit no parent block (a default, not a constraint).
Sourcepub fn settings(self, settings: Settings) -> Self
pub fn settings(self, settings: Settings) -> Self
Set every policy knob at once, from a Settings built elsewhere —
typically Settings::from(&config), which is the whole of what a
workspace’s config document declares.
Supersedes anything the individual setters put there, so call it first if you mean to override one knob afterwards.
Sourcepub fn identity<Id2>(self, identity: Id2) -> WorkspaceBuilder<FS, Id2, Ix>
pub fn identity<Id2>(self, identity: Id2) -> WorkspaceBuilder<FS, Id2, Ix>
Attach an identity policy, turning identity on.
Sourcepub fn index<Ix2>(self, index: Ix2) -> WorkspaceBuilder<FS, Id, Ix2>
pub fn index<Ix2>(self, index: Ix2) -> WorkspaceBuilder<FS, Id, Ix2>
Attach an index store (where IDs are persisted).
Sourcepub fn build(self) -> Workspace<FS, Id, Ix>
pub fn build(self) -> Workspace<FS, Id, Ix>
Finish building.
This is where the ten authoring settings are split: the three the read
core needs are copied into the Graph’s ReadSettings, and the
whole set is kept alongside for the verbs. Nothing mutates either
afterwards, so the two copies of those three cannot drift.