nu_protocol/engine/
cached_file.rs

1use crate::Span;
2use std::sync::Arc;
3
4/// Unit of cached source code
5#[derive(Clone)]
6pub struct CachedFile {
7    // Use Arcs of slice types for more compact representation (capacity less)
8    // Could possibly become an `Arc<PathBuf>`
9    /// The file name with which the code is associated (also includes REPL input)
10    pub name: Arc<str>,
11    /// Source code as raw bytes
12    pub content: Arc<[u8]>,
13    /// global span coordinates that are covered by this [`CachedFile`]
14    pub covered_span: Span,
15}