pub struct HtmlGenerator { /* private fields */ }Expand description
HTML 生成器
Implementations§
Source§impl HtmlGenerator
impl HtmlGenerator
Sourcepub fn with_config_and_theme(config: Config, theme_name: &str) -> Self
pub fn with_config_and_theme(config: Config, theme_name: &str) -> Self
Sourcepub fn with_config(config: Config) -> Self
pub fn with_config(config: Config) -> Self
Sourcepub fn current_theme_name(&self) -> &str
pub fn current_theme_name(&self) -> &str
获取当前主题名称
Sourcepub fn available_themes() -> Vec<&'static str>
pub fn available_themes() -> Vec<&'static str>
获取可用主题列表
Sourcepub fn generate_with_context(
&self,
context: &PageContext,
) -> Result<String, Box<dyn Error>>
pub fn generate_with_context( &self, context: &PageContext, ) -> Result<String, Box<dyn Error>>
Sourcepub fn static_resources(&self) -> Vec<(String, String)>
pub fn static_resources(&self) -> Vec<(String, String)>
获取主题的静态资源
Trait Implementations§
Source§impl Clone for HtmlGenerator
impl Clone for HtmlGenerator
Auto Trait Implementations§
impl Freeze for HtmlGenerator
impl !RefUnwindSafe for HtmlGenerator
impl Send for HtmlGenerator
impl Sync for HtmlGenerator
impl Unpin for HtmlGenerator
impl UnsafeUnpin for HtmlGenerator
impl !UnwindSafe for HtmlGenerator
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