pub struct HtmlConfig {
pub enable_syntax_highlighting: bool,
pub syntax_theme: Option<String>,
pub minify_output: bool,
pub add_aria_attributes: bool,
pub generate_structured_data: bool,
pub max_input_size: usize,
pub language: String,
pub generate_toc: bool,
}Expand description
Configuration options for HTML generation.
Controls various aspects of the HTML generation process including syntax highlighting, accessibility features, and output formatting.
Fields§
§enable_syntax_highlighting: boolEnable syntax highlighting for code blocks
syntax_theme: Option<String>Theme to use for syntax highlighting
minify_output: boolMinify the generated HTML output
add_aria_attributes: boolAutomatically add ARIA attributes for accessibility
generate_structured_data: boolGenerate structured data (JSON-LD) based on content
max_input_size: usizeMaximum size (in bytes) for input content
language: StringLanguage for generated content
generate_toc: boolEnable table of contents generation
Implementations§
Source§impl HtmlConfig
impl HtmlConfig
Sourcepub fn builder() -> HtmlConfigBuilder
pub fn builder() -> HtmlConfigBuilder
Creates a new HtmlConfig using the builder pattern.
§Examples
use html_generator::HtmlConfig;
let config = HtmlConfig::builder()
.with_syntax_highlighting(true, Some("monokai".to_string()))
.with_language("en-GB")
.build()
.unwrap();Trait Implementations§
Source§impl Clone for HtmlConfig
impl Clone for HtmlConfig
Source§fn clone(&self) -> HtmlConfig
fn clone(&self) -> HtmlConfig
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 HtmlConfig
impl Debug for HtmlConfig
Source§impl Default for HtmlConfig
impl Default for HtmlConfig
Source§impl PartialEq for HtmlConfig
impl PartialEq for HtmlConfig
impl Eq for HtmlConfig
impl StructuralPartialEq for HtmlConfig
Auto Trait Implementations§
impl Freeze for HtmlConfig
impl RefUnwindSafe for HtmlConfig
impl Send for HtmlConfig
impl Sync for HtmlConfig
impl Unpin for HtmlConfig
impl UnwindSafe for HtmlConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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