pub enum HtmlFormat {
CustomElements,
CustomElementsWithPrefix(String),
ClassNames,
ClassNamesWithPrefix(String),
}Expand description
HTML output format for syntax highlighting.
Variants§
CustomElements
Custom elements with default prefix: <a-k>, <a-f>, etc. (default)
This is the most compact format and leverages custom HTML elements.
§Example
<a-k>fn</a-k> <a-f>main</a-f>()CustomElementsWithPrefix(String)
Custom elements with custom prefix: <prefix-k>, <prefix-f>, etc.
Useful for branding or avoiding conflicts with other custom elements.
§Example
<!-- With prefix "code" -->
<code-k>fn</code-k> <code-f>main</code-f>()ClassNames
Traditional class-based spans: <span class="keyword">, etc.
Compatible with existing tooling that expects class-based markup.
§Example
<span class="keyword">fn</span> <span class="function">main</span>()ClassNamesWithPrefix(String)
Class-based spans with custom prefix: <span class="prefix-keyword">, etc.
Useful for namespacing CSS classes.
§Example
<!-- With prefix "arb" -->
<span class="arb-keyword">fn</span> <span class="arb-function">main</span>()Trait Implementations§
Source§impl Clone for HtmlFormat
impl Clone for HtmlFormat
Source§fn clone(&self) -> HtmlFormat
fn clone(&self) -> HtmlFormat
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 HtmlFormat
impl Debug for HtmlFormat
Source§impl Default for HtmlFormat
impl Default for HtmlFormat
Source§impl PartialEq for HtmlFormat
impl PartialEq for HtmlFormat
impl Eq for HtmlFormat
impl StructuralPartialEq for HtmlFormat
Auto Trait Implementations§
impl Freeze for HtmlFormat
impl RefUnwindSafe for HtmlFormat
impl Send for HtmlFormat
impl Sync for HtmlFormat
impl Unpin for HtmlFormat
impl UnsafeUnpin for HtmlFormat
impl UnwindSafe for HtmlFormat
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