#[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
impl Copy for ClassStyle
impl Eq for ClassStyle
impl StructuralPartialEq for ClassStyle
Auto Trait Implementations§
impl Freeze for ClassStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.