Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 19 fields pub substitute: Option<SubstituteConfig>, pub processing: Option<Processing>, pub locale_override: Option<String>, pub localize: Option<Localize>, pub multilingual: Option<MultilingualConfig>, pub contributors: Option<ContributorConfig>, pub dates: Option<DateConfig>, pub titles: Option<TitlesConfig>, pub locators: Option<LocatorConfig>, pub page_range_format: Option<PageRangeFormat>, pub links: Option<LinksConfig>, pub punctuation_in_quote: bool, pub volume_pages_delimiter: Option<DelimiterPunctuation>, pub strip_periods: Option<bool>, pub notes: Option<NoteConfig>, pub integral_name_memory: Option<IntegralNameMemoryConfig>, pub org_abbreviation_memory: Option<OrgAbbreviationMemoryConfig>, pub custom: Option<HashMap<String, Value>>, pub unknown_fields: BTreeMap<String, Value>,
}
Expand description

Top-level style configuration.

Fields§

§substitute: Option<SubstituteConfig>

Substitution rules for missing data.

§processing: Option<Processing>

Processing mode (author-date, numeric, etc.).

§locale_override: Option<String>

Style-level locale override ID loaded from locales/overrides/<id>.*.

This patches the locale selected by StyleInfo.default_locale without duplicating the full base locale. Runtime loading is limited to the style-global config; nested citation or bibliography configs are ignored.

§localize: Option<Localize>

Localization settings.

§multilingual: Option<MultilingualConfig>

Multilingual rendering defaults.

§contributors: Option<ContributorConfig>

Contributor formatting defaults. Accepts a preset name (e.g., “apa”) or explicit configuration.

§dates: Option<DateConfig>

Date formatting defaults. Accepts a preset name (e.g., “long”) or explicit configuration.

§titles: Option<TitlesConfig>

Title formatting defaults. Accepts a preset name (e.g., “apa”) or explicit configuration.

§locators: Option<LocatorConfig>

Locator rendering configuration. Accepts a preset name (e.g., “note”) or explicit configuration.

§page_range_format: Option<PageRangeFormat>

Page range formatting (expanded, minimal, chicago).

§links: Option<LinksConfig>

Hyperlink configuration.

§punctuation_in_quote: bool

Whether to place periods/commas inside quotation marks. true = American style (“text.”), false = British style (“text”.) Defaults to false; en-US locale typically sets this to true.

§volume_pages_delimiter: Option<DelimiterPunctuation>

Delimiter between volume/issue and pages for serial sources. Processor adds trailing space when rendering. Examples: Comma (APA “, “), Colon (Chicago “: “).

§strip_periods: Option<bool>

Strip trailing periods from terms, labels, and abbreviated dates.

§notes: Option<NoteConfig>

Document-level note marker placement and punctuation movement rules.

§integral_name_memory: Option<IntegralNameMemoryConfig>

Integral citation name-memory behavior.

§org_abbreviation_memory: Option<OrgAbbreviationMemoryConfig>

Organizational name abbreviation expansion policy.

§custom: Option<HashMap<String, Value>>

Custom user-defined fields for extensions.

§unknown_fields: BTreeMap<String, Value>

Forward-compat: captures unknown keys when an older engine reads a style produced by a newer schema. Empty by default; treated as a SoftDegrade signal. See docs/specs/FORWARD_COMPATIBILITY.md.

Implementations§

Source§

impl Config

Source

pub fn merge(&mut self, other: &Config)

Merge another config into this one, with other taking precedence.

Used for combining global options with context-specific (citation/bibliography) options. Only non-None fields from other override fields in self.

Source

pub fn merged(base: &Config, override_config: &Config) -> Config

Create a merged config from base and override, returning a new Config.

Convenience method that clones base, then merges override into it.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Config

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Config

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Config, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Config

Source§

fn eq(&self, other: &Config) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Config

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Config

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,