pub struct Theme { /* private fields */ }Expand description
The Theme struct should be used instead of the static variables because
the new() method will look if the user has a theme directory in their
source folder and use the users theme instead of the default.
You should only ever use the static variables directly if you want to override the user’s theme with the defaults.
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn new<P: AsRef<Path>>(theme_dir: P) -> Self
pub fn new<P: AsRef<Path>>(theme_dir: P) -> Self
Creates a Theme from the given theme_dir.
If a file is found in the theme dir, it will override the default version.
Sourcepub fn copy_theme(html_config: &HtmlConfig, root: &Path) -> Result<()>
pub fn copy_theme(html_config: &HtmlConfig, root: &Path) -> Result<()>
Copies the default theme files to the theme directory.
Trait Implementations§
impl StructuralPartialEq for Theme
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnwindSafe for Theme
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