#[non_exhaustive]pub struct PreprocessorContext {
pub root: PathBuf,
pub config: Config,
pub renderer: String,
pub mdbook_version: String,
pub chapter_titles: RefCell<HashMap<PathBuf, String>>,
}Expand description
Extra information for a Preprocessor to give them more context when
processing a book.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.root: PathBufThe location of the book directory on disk.
config: ConfigThe book configuration (book.toml).
renderer: StringThe Renderer this preprocessor is being used with.
mdbook_version: StringThe calling mdbook version.
chapter_titles: RefCell<HashMap<PathBuf, String>>Internal mapping of chapter titles.
This is used internally by mdbook to compute custom chapter titles. This should not be used outside of mdbook’s internals.
Implementations§
Trait Implementations§
Source§impl Clone for PreprocessorContext
impl Clone for PreprocessorContext
Source§fn clone(&self) -> PreprocessorContext
fn clone(&self) -> PreprocessorContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PreprocessorContext
impl Debug for PreprocessorContext
Source§impl<'de> Deserialize<'de> for PreprocessorContext
impl<'de> Deserialize<'de> for PreprocessorContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for PreprocessorContext
impl PartialEq for PreprocessorContext
Source§impl Serialize for PreprocessorContext
impl Serialize for PreprocessorContext
impl StructuralPartialEq for PreprocessorContext
Auto Trait Implementations§
impl !Freeze for PreprocessorContext
impl !RefUnwindSafe for PreprocessorContext
impl Send for PreprocessorContext
impl !Sync for PreprocessorContext
impl Unpin for PreprocessorContext
impl UnwindSafe for PreprocessorContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more