Function cedar_policy_core::parser::parse_policy

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

simple main function for parsing a policy. If id is Some, then the resulting policy will have that id. If the id is None, the parser will use “policy0”.