Skip to main content

parse_declarations

Function parse_declarations 

Source
pub fn parse_declarations(
    json: &[u8],
) -> Result<Vec<ActivityDeclaration>, CodegenError>
Expand description

Parses and validates the canonical activity-manifest JSON.

ยงErrors

Returns CodegenError::ManifestParse if the bytes are not a JSON array of declaration objects, CodegenError::InvalidActivityName for a name that cannot name an engine activity, CodegenError::DuplicateActivity for a repeated name, and CodegenError::UnknownTier for an unrecognised tier. Declaration order is preserved.