Skip to main content

Module profile

Module profile 

Source
Expand description

What a profile declares, in its profile.toml.

A profile is a directory in a source: profile.toml, and files/ mirroring the target. Every path [files] lists must exist under files/; nothing else there is applied. An entry owns its whole file unless its Scope says less, when its payload is the part: a partial document, or a block’s lines. A path may use variables, crates/{{ name }}/Cargo.toml, and its payload is found under files/ as written.

mdbook/
├── profile.toml
└── files/
    ├── {{ book_dir }}/book.toml
    └── {{ book_dir }}/theme/katex.css

A profile builds on others by name, [requires], and offers features, [features], which add files, parts, requirements and features of what it requires; an entry applies only when its When holds. A scaffold, [scaffolds], is a group of starter files written once, when none of its sentinels is there.

Re-exports§

pub use crate::name::FeatureName;
pub use crate::name::ProfileName;
pub use crate::name::ScaffoldName;

Structs§

Features
The [features] table: default, and every feature with what it turns on.
FileSpec
A profile’s [files."path"] entry.
Manifest
profile.toml.
MergeSpec
A [merge] table: defaults in profile.toml, decisions in .devset/config.toml.
Meta
The [profile] table.
Patterns
Paths or globs in the target: a string, or a list of them.
Requirement
A profile another builds on, keyed by its name in [requires].
ScaffoldSpec
A [scaffolds.name] entry: a group of starter files, written together once.
VarName
A variable’s name: an identifier, [A-Za-z_][A-Za-z0-9_]*, but not devset.
VarSpec
A [vars.name] entry.
When
When an entry applies: every condition holds.

Enums§

Comment
A line comment syntax, which a block’s markers are written in.
FeatureRef
What a feature turns on.
Format
How a file is checked after a merge: it must parse, with no duplicate keys.
OnConflict
What an update does when a file conflicts.
Policy
How devset manages a file.
Scope
How much of a file a profile owns.