pub struct ParseResult {
pub tier: u8,
pub frontmatter: Option<Frontmatter>,
pub body: String,
pub variables: Vec<String>,
pub warnings: Vec<ParseWarning>,
}Expand description
Output of parsing a .prompt file.
The tier field indicates the structured richness of the file:
1- plain template body only, no frontmatter.2- YAML frontmatter present with at leastid+version.3- Tier 2 +evalsand/orchains_to.
Fields§
§tier: u8Detected tier (1, 2, or 3).
frontmatter: Option<Frontmatter>Parsed YAML frontmatter. None for Tier 1 files.
body: StringThe Handlebars template body (everything after the closing ---).
variables: Vec<String>Variables extracted from {{variable}} markers in the body.
De-duplicated, sorted alphabetically.
warnings: Vec<ParseWarning>Non-fatal issues encountered during parsing.
Trait Implementations§
Source§impl Clone for ParseResult
impl Clone for ParseResult
Source§fn clone(&self) -> ParseResult
fn clone(&self) -> ParseResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParseResult
impl Debug for ParseResult
Source§impl<'de> Deserialize<'de> for ParseResult
impl<'de> Deserialize<'de> for ParseResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ParseResult
impl PartialEq for ParseResult
Source§fn eq(&self, other: &ParseResult) -> bool
fn eq(&self, other: &ParseResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ParseResult
impl Serialize for ParseResult
impl StructuralPartialEq for ParseResult
Auto Trait Implementations§
impl Freeze for ParseResult
impl RefUnwindSafe for ParseResult
impl Send for ParseResult
impl Sync for ParseResult
impl Unpin for ParseResult
impl UnsafeUnpin for ParseResult
impl UnwindSafe for ParseResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more