pub struct Bundle {
pub manifest: Option<Manifest>,
pub data: Option<Value>,
pub rego_policies: HashMap<PathBuf, String>,
pub wasm_policies: Vec<WasmPolicy>,
}
Expand description
An OPA bundle created by opa build
.
Fields
manifest: Option<Manifest>
The manifest of the bundle, if any.
data: Option<Value>
The OPA generated data that was bundled during build.
rego_policies: HashMap<PathBuf, String>
All .rego
policy files with their respective paths within
the bundle.
wasm_policies: Vec<WasmPolicy>
All WASM module policies within the bundle.
A WASM module policy should appear here only if it was listed in the manifest.
Implementations
sourceimpl Bundle
impl Bundle
sourcepub fn from_file(path: impl AsRef<Path>) -> Result<Self, Error>
pub fn from_file(path: impl AsRef<Path>) -> Result<Self, Error>
Load the bundle from a file.
Errors
Errors are returned if the given bundle is invalid or the file operations fail.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Bundle
impl Send for Bundle
impl Sync for Bundle
impl Unpin for Bundle
impl UnwindSafe for Bundle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more