MCPcopy Create free account
hub / github.com/rolldown/rolldown / MagicString

Class MagicString

crates/string_wizard/src/magic_string/mod.rs:31–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30#[derive(Debug, Clone)]
31pub struct MagicString<'s> {
32 filename: Option<String>,
33 ignore_list: bool,
34 intro: VecDeque<CowStr<'s>>,
35 outro: VecDeque<CowStr<'s>>,
36 source: Cow<'s, str>,
37 chunks: IndexChunks<'s>,
38 first_chunk_idx: ChunkIdx,
39 last_chunk_idx: ChunkIdx,
40 chunk_by_start: FxHashMap<u32, ChunkIdx>,
41 chunk_by_end: FxHashMap<u32, ChunkIdx>,
42 guessed_indentor: OnceLock<String>,
43
44 // This is used to speed up the search for the chunk that contains a given index.
45 last_searched_chunk_idx: ChunkIdx,
46}
47
48impl Default for MagicString<'_> {
49 fn default() -> Self {

Callers 1

send_magic_stringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…