Skip to main content

parse_policy

Function parse_policy 

Source
pub fn parse_policy(policy: &str) -> Result<ParsedPolicy>
Expand description

Parse and validate a policy definition string.

The expected format is line-oriented:

policy <name>
  <action> <target> [when <condition>]
  ...
end

Returns a ParsedPolicy on success, or a descriptive error.