diff --git a/src/cargo/util/frontmatter.rs b/src/cargo/util/frontmatter.rs index 7fbe7a5c3..75429b99e 100644 --- a/src/cargo/util/frontmatter.rs +++ b/src/cargo/util/frontmatter.rs @@ -4,12 +4,20 @@ type Span = std::ops::Range; #[derive(Debug)] pub struct ScriptSource<'s> { + /// The full file raw: &'s str, + /// The `#!/usr/bin/env cargo` line, if present shebang: Option, + /// The code fence opener (`---`) open: Option, + /// Trailing text after `ScriptSource::open` that identifies the meaning of + /// `ScriptSource::frontmatter` info: Option, + /// The lines between `ScriptSource::open` and `ScriptSource::close` frontmatter: Option, + /// The code fence closer (`---`) close: Option, + /// All content after the frontmatter and shebang content: Span, }