euv-docs 0.37.0

A documentation site generator powered by euv + euv-ui (Rust/WASM).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::*;

/// One highlighted segment of a code block.
///
/// The segment text is owned rather than borrowed: the tokenizer cuts
/// the source at arbitrary boundaries, and a block's code is a `&'static
/// str` that the renderer copies into the DOM anyway.
#[derive(Clone, Debug, Eq, PartialEq)]
pub(crate) struct CodeToken {
    /// The kind of the segment.
    pub(crate) kind: CodeTokenKind,
    /// The segment text.
    pub(crate) text: String,
}