pub trait PlaybookResolverExt {
// Required method
fn resolve_unsafe_playbook(
&self,
id: &str,
) -> Result<Playbook, ValidationError>;
}Expand description
Extension trait that surfaces the resolved Playbook from a
PlaybookResolver without going through the full
precedence ladder.
This is a convenience used by downstream callers that want to
read the raw codified Playbook (e.g. for diagnostics or
for round-tripping the rule table back to TOML). The trait
lives in the vendor_resolver module because it is primarily
useful in conjunction with the vendor resolver — when
VendorResolver::resolve_with_playbooks returns a
ResolvedPlaybook, callers occasionally need to read the
underlying codified playbook for description /
target_class audit fields.
Required Methods§
Sourcefn resolve_unsafe_playbook(&self, id: &str) -> Result<Playbook, ValidationError>
fn resolve_unsafe_playbook(&self, id: &str) -> Result<Playbook, ValidationError>
Resolve a single playbook by id, returning the underlying
Playbook without applying any precedence / override
merge.
§Errors
Returns
ValidationError::UnknownPlaybook
when the id is not registered.