Struct mdbook::config::Config
[−]
[src]
pub struct Config { pub book: BookConfig, pub build: BuildConfig, // some fields omitted }
The overall configuration object for MDBook.
Fields
book: BookConfig
Metadata about the book.
build: BuildConfig
Methods
impl Config
[src]
fn from_str(src: &str) -> Result<Config>
[src]
Load a Config
from some string.
fn from_disk<P: AsRef<Path>>(config_file: P) -> Result<Config>
[src]
Load the configuration file from disk.
fn get(&self, key: &str) -> Option<&Value>
[src]
Fetch an arbitrary item from the Config
as a toml::Value
.
You can use dotted indices to access nested items (e.g.
output.html.playpen
will fetch the "playpen" out of the html output
table).
fn get_mut<'a>(&'a mut self, key: &str) -> Option<&'a mut Value>
[src]
Fetch a value from the Config
so you can mutate it.
fn html_config(&self) -> Option<HtmlConfig>
[src]
Convenience method for getting the html renderer's configuration.
Note
This is for compatibility only. It will be removed completely once the rendering and plugin system is established.
fn get_deserialized<'de, T: Deserialize<'de>, S: AsRef<str>>(
&self,
name: S
) -> Result<T>
[src]
&self,
name: S
) -> Result<T>
Convenience function to fetch a value from the config and deserialize it into some arbitrary type.
Trait Implementations
impl Debug for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Config
[src]
impl PartialEq for Config
[src]
fn eq(&self, __arg_0: &Config) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Config) -> bool
[src]
This method tests for !=
.
impl<'de> Deserialize<'de> for Config
[src]
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
[src]
Deserialize this value from the given Serde deserializer. Read more