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
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
Fields
prefix: &'static str
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
sourceimpl Clone for ClassStyle
impl Clone for ClassStyle
sourcefn clone(&self) -> ClassStyle
fn clone(&self) -> ClassStyle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClassStyle
impl Debug for ClassStyle
sourceimpl PartialEq<ClassStyle> for ClassStyle
impl PartialEq<ClassStyle> for ClassStyle
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ClassStyle) -> bool
fn ne(&self, other: &ClassStyle) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more