Enum syntect::html::ClassStyle
source · #[non_exhaustive]pub enum ClassStyle {
Spaced,
SpacedPrefixed {
prefix: &'static str,
},
}
Variants (Non-exhaustive)§
This enum is marked as 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.)
Trait Implementations§
source§impl Clone for ClassStyle
impl Clone for ClassStyle
source§fn clone(&self) -> ClassStyle
fn clone(&self) -> ClassStyle
Returns a copy 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 ClassStyle
impl Debug for ClassStyle
source§impl PartialEq for ClassStyle
impl PartialEq for ClassStyle
source§fn eq(&self, other: &ClassStyle) -> bool
fn eq(&self, other: &ClassStyle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ClassStyle
impl Eq for ClassStyle
impl StructuralEq for ClassStyle
impl StructuralPartialEq for ClassStyle
Auto Trait Implementations§
impl RefUnwindSafe for ClassStyle
impl Send for ClassStyle
impl Sync for ClassStyle
impl Unpin for ClassStyle
impl UnwindSafe for ClassStyle
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