Skip to main content

StyleInfo

Struct StyleInfo 

Source
pub struct StyleInfo {
    pub title: Option<String>,
    pub id: Option<String>,
    pub description: Option<String>,
    pub default_locale: Option<String>,
    pub fields: Vec<CitationField>,
    pub source: Option<StyleSource>,
    pub short_name: Option<String>,
    pub edition: Option<String>,
    pub citum_version: Option<String>,
}
Expand description

Style metadata.

Fields§

§title: Option<String>

Human-readable title of the style.

§id: Option<String>

Stable identifier for the style, usually a URI or slug.

§description: Option<String>

Short summary of the style’s intended use or provenance.

§default_locale: Option<String>

Default locale for the style (e.g., “en-US”, “de-DE”). Used for locale-aware term resolution.

§fields: Vec<CitationField>

Discipline classifications for this style.

§source: Option<StyleSource>

Provenance: set when this style was adapted from a CSL 1.0 source.

§short_name: Option<String>

Concise display name for the style family, used by UIs to label search results and match banners (e.g. "APA", "Chicago Notes", "MLA"). Omit for journal-specific styles whose full title is their identity. Combine with edition to produce labels like "APA 7th".

§edition: Option<String>

Edition or version qualifier used alongside short_name to disambiguate multiple editions of the same style family (e.g. "7th", "18th edition"). Omit when only one edition exists.

§citum_version: Option<String>

Minimum Citum engine version required to load and render this style.

Accepts a semver::VersionReq-compatible string (e.g. ">=0.38.0", "^0.40"). When the running engine does not satisfy the requirement, the resolver returns ResolutionError::VersionMismatch instead of attempting to deserialize fields the engine may not understand. Omit for styles that use only stable, long-lived features.

Implementations§

Source§

impl StyleInfo

Source

pub fn is_empty(&self) -> bool

Returns true when all fields are absent (no content to merge).

Trait Implementations§

Source§

impl Clone for StyleInfo

Source§

fn clone(&self) -> StyleInfo

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 StyleInfo

Source§

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

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

impl Default for StyleInfo

Source§

fn default() -> StyleInfo

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

impl<'de> Deserialize<'de> for StyleInfo

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<StyleInfo, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

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

impl Serialize for StyleInfo

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

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,