Skip to main content

parse_contract

Function parse_contract 

Source
pub fn parse_contract(path: &Path) -> Result<Contract, ContractError>
Expand description

Parse a YAML contract file into a Contract struct.

This is the entry point for Phase 2 validation. The parser deserializes the YAML and performs structural checks.

§Errors

Returns ContractError::Io if the file cannot be read, or ContractError::Yaml if the YAML is malformed.