cedar_policy_core::parser

Function parse_policy

Source
pub fn parse_policy(
    id: Option<PolicyID>,
    text: &str,
) -> Result<StaticPolicy, ParseErrors>
Expand description

Main function for parsing a (static) policy. Will return an error if provided with a template. If id is Some, then the resulting policy will have that id. If the id is None, the parser will use “policy0”.