pub struct LoadedPack {
pub pack: Pack,
pub root: PathBuf,
pub templates_dir: PathBuf,
pub crds_dir: Option<PathBuf>,
pub values_path: PathBuf,
pub schema_path: Option<PathBuf>,
}Expand description
Loaded pack with resolved paths
Fields§
§pack: PackPack definition
root: PathBufRoot directory of the pack
templates_dir: PathBufTemplates directory
crds_dir: Option<PathBuf>CRDs directory (if present)
values_path: PathBufValues file path
schema_path: Option<PathBuf>Schema file path (if present)
Implementations§
Source§impl LoadedPack
impl LoadedPack
Sourcepub fn load_schema(&self) -> Result<Option<Schema>>
pub fn load_schema(&self) -> Result<Option<Schema>>
Load the schema if present
Sourcepub fn template_files(&self) -> Result<Vec<PathBuf>>
pub fn template_files(&self) -> Result<Vec<PathBuf>>
Get list of template files
Sourcepub fn crd_files(&self) -> Result<Vec<PathBuf>>
pub fn crd_files(&self) -> Result<Vec<PathBuf>>
Get list of CRD files from crds/ directory
CRD files are not templated and are applied before regular templates. Files are sorted alphabetically for deterministic ordering.
Sourcepub fn load_crds(&self) -> Result<Vec<CrdManifest>>
pub fn load_crds(&self) -> Result<Vec<CrdManifest>>
Load all CRD manifests from crds/ directory
CRD files may contain Jinja templating syntax. Files with templating
are flagged with is_templated: true and should be rendered before use.
Sourcepub fn static_crds(&self) -> Result<Vec<CrdManifest>>
pub fn static_crds(&self) -> Result<Vec<CrdManifest>>
Get only static (non-templated) CRDs
Sourcepub fn templated_crds(&self) -> Result<Vec<CrdManifest>>
pub fn templated_crds(&self) -> Result<Vec<CrdManifest>>
Get only templated CRDs (need rendering before use)
Sourcepub fn has_templated_crds(&self) -> Result<bool>
pub fn has_templated_crds(&self) -> Result<bool>
Check if this pack has templated CRDs
Trait Implementations§
Source§impl Clone for LoadedPack
impl Clone for LoadedPack
Source§fn clone(&self) -> LoadedPack
fn clone(&self) -> LoadedPack
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LoadedPack
impl RefUnwindSafe for LoadedPack
impl Send for LoadedPack
impl Sync for LoadedPack
impl Unpin for LoadedPack
impl UnwindSafe for LoadedPack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more