pub struct StyleProfileConfig {
pub extends: Option<String>,
pub name: Option<String>,
pub verbosity: Option<String>,
pub list_style_bias: Option<String>,
pub pronoun_density: Option<String>,
pub salience: Option<String>,
pub sentence_length: Option<LengthDistributionConfig>,
pub connectives: Option<ConnectivePreferencesConfig>,
pub hedging: Option<HedgingCalibrationConfig>,
}Expand description
TOML representation of a StyleProfile.
Every field is optional so an authoring file can declare just the dials
it cares about; missing fields fall through to the neutral default.
extends = "path" loads another StyleProfileConfig as the base; the
inline Some(_) fields then override per-dial.
Fields§
§extends: Option<String>Optional path (relative to the manifest’s directory) to another profile TOML to use as the base. Inline fields below override the base per-dial.
name: Option<String>§verbosity: Option<String>§list_style_bias: Option<String>§pronoun_density: Option<String>§salience: Option<String>§sentence_length: Option<LengthDistributionConfig>§connectives: Option<ConnectivePreferencesConfig>§hedging: Option<HedgingCalibrationConfig>Implementations§
Source§impl StyleProfileConfig
impl StyleProfileConfig
Sourcepub fn into_style_profile(
self,
manifest_dir: &Path,
) -> Result<StyleProfile, ProjectError>
pub fn into_style_profile( self, manifest_dir: &Path, ) -> Result<StyleProfile, ProjectError>
Convert this TOML config into a validated StyleProfile.
manifest_dir is the directory containing the project’s
prosaic.toml; relative extends paths resolve from there. The
returned profile has been run through StyleProfile::validate
— invalid configurations surface as ProjectError::ManifestStyle
rather than silently producing a half-built profile.
Trait Implementations§
Source§impl Clone for StyleProfileConfig
impl Clone for StyleProfileConfig
Source§fn clone(&self) -> StyleProfileConfig
fn clone(&self) -> StyleProfileConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more