Struct BuildConfig

Source
pub struct BuildConfig {
Show 33 fields pub parallel_jobs: Option<usize>, pub max_cache_size_mb: usize, pub cache_expiration_hours: u64, pub output: OutputConfig, pub theme: ThemeConfig, pub extensions: Vec<String>, pub template_dirs: Vec<PathBuf>, pub static_dirs: Vec<PathBuf>, pub optimization: OptimizationConfig, pub project: String, pub version: Option<String>, pub release: Option<String>, pub copyright: Option<String>, pub language: Option<String>, pub root_doc: Option<String>, pub html_style: Vec<String>, pub html_css_files: Vec<String>, pub html_js_files: Vec<String>, pub html_static_path: Vec<PathBuf>, pub html_logo: Option<String>, pub html_favicon: Option<String>, pub html_title: Option<String>, pub html_short_title: Option<String>, pub html_show_copyright: Option<bool>, pub html_show_sphinx: Option<bool>, pub html_copy_source: Option<bool>, pub html_show_sourcelink: Option<bool>, pub html_sourcelink_suffix: Option<String>, pub html_use_index: Option<bool>, pub html_use_opensearch: Option<bool>, pub html_last_updated_fmt: Option<String>, pub templates_path: Vec<PathBuf>, pub fail_on_warning: bool,
}

Fields§

§parallel_jobs: Option<usize>

Number of parallel jobs to use (defaults to number of CPU cores)

§max_cache_size_mb: usize

Maximum cache size in MB

§cache_expiration_hours: u64

Cache expiration time in hours

§output: OutputConfig

Output format configuration

§theme: ThemeConfig

Theme configuration

§extensions: Vec<String>

Extension configuration

§template_dirs: Vec<PathBuf>

Custom template directories

§static_dirs: Vec<PathBuf>

Static file directories

§optimization: OptimizationConfig

Build optimization settings

§project: String

Project name

§version: Option<String>

Project version

§release: Option<String>

Project release

§copyright: Option<String>

Copyright notice

§language: Option<String>

Language code

§root_doc: Option<String>

Root document

§html_style: Vec<String>

HTML theme style files

§html_css_files: Vec<String>

HTML CSS files

§html_js_files: Vec<String>

HTML JavaScript files

§html_static_path: Vec<PathBuf>

HTML static paths

HTML logo file

§html_favicon: Option<String>

HTML favicon file

§html_title: Option<String>

HTML title

§html_short_title: Option<String>

HTML short title

§html_show_copyright: Option<bool>

Show copyright in HTML

§html_show_sphinx: Option<bool>

Show Sphinx attribution

§html_copy_source: Option<bool>

Copy source files

§html_show_sourcelink: Option<bool>

Show source links

§html_sourcelink_suffix: Option<String>

Source link suffix

§html_use_index: Option<bool>

Use index

§html_use_opensearch: Option<bool>

Use OpenSearch

§html_last_updated_fmt: Option<String>

Last updated format

§templates_path: Vec<PathBuf>

Templates path

§fail_on_warning: bool

Turn warnings into errors

Implementations§

Source§

impl BuildConfig

Source

pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>

Source

pub fn from_conf_py<P: AsRef<Path>>(conf_py_path: P) -> Result<Self>

Load configuration from a Sphinx conf.py file

Source

pub fn auto_detect<P: AsRef<Path>>(source_dir: P) -> Result<Self>

Try to auto-detect and load configuration from various sources

Source

pub fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>

Trait Implementations§

Source§

impl Clone for BuildConfig

Source§

fn clone(&self) -> BuildConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for BuildConfig

Source§

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

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

impl Default for BuildConfig

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for BuildConfig

Source§

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

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

impl Serialize for BuildConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

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>,