We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4909d78 commit 0603e4eCopy full SHA for 0603e4e
src/cargo/util/frontmatter.rs
@@ -4,12 +4,20 @@ type Span = std::ops::Range<usize>;
4
5
#[derive(Debug)]
6
pub struct ScriptSource<'s> {
7
+ /// The full file
8
raw: &'s str,
9
+ /// The `#!/usr/bin/env cargo` line, if present
10
shebang: Option<Span>,
11
+ /// The code fence opener (`---`)
12
open: Option<Span>,
13
+ /// Trailing text after `ScriptSource::open` that identifies the meaning of
14
+ /// `ScriptSource::frontmatter`
15
info: Option<Span>,
16
+ /// The lines between `ScriptSource::open` and `ScriptSource::close`
17
frontmatter: Option<Span>,
18
+ /// The code fence closer (`---`)
19
close: Option<Span>,
20
+ /// All content after the frontmatter and shebang
21
content: Span,
22
}
23
0 commit comments