[][src]Enum syntect::html::ClassStyle

#[non_exhaustive]pub enum ClassStyle {
    Spaced,
    SpacedPrefixed {
        prefix: &'static str,
    },
}

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Spaced

The classes are the atoms of the scope separated by spaces (e.g source.php becomes source php). This isn't that fast since it has to use the scope repository to look up scope names.

SpacedPrefixed

Like Spaced, but the given prefix will be prepended to all classes. This is useful to prevent class name collisions, and can ensure that the theme's CSS applies precisely to syntect's output.

The prefix must be a valid CSS class name. To help ennforce this invariant and prevent accidental foot-shooting, it must be statically known. (If this requirement is onerous, please file an issue; the HTML generator can also be forked separately from the rest of syntect, as it only uses the public API.)

Fields of SpacedPrefixed

prefix: &'static str

Trait Implementations

impl Clone for ClassStyle[src]

impl Copy for ClassStyle[src]

impl Debug for ClassStyle[src]

impl Eq for ClassStyle[src]

impl PartialEq<ClassStyle> for ClassStyle[src]

impl StructuralEq for ClassStyle[src]

impl StructuralPartialEq for ClassStyle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.