pub struct LayeredAssetManager { /* private fields */ }Expand description
A layered implementation of AssetManager that checks multiple sources in priority order
Implementations§
Source§impl LayeredAssetManager
impl LayeredAssetManager
Sourcepub fn new(layers: Vec<Arc<dyn AssetManager>>) -> Self
pub fn new(layers: Vec<Arc<dyn AssetManager>>) -> Self
Creates a new LayeredAssetManager with the given layers in priority order
Sourcepub fn new_with_standard_layers(
project_root: Option<&Path>,
xdg_dirs: &XdgDirectories,
) -> Self
pub fn new_with_standard_layers( project_root: Option<&Path>, xdg_dirs: &XdgDirectories, ) -> Self
Creates a LayeredAssetManager with standard layers:
- Project-level templates (.tsk/templates)
- User-level templates (~/.config/tsk/templates)
- Built-in templates (embedded)
Trait Implementations§
Source§impl AssetManager for LayeredAssetManager
impl AssetManager for LayeredAssetManager
Source§fn get_template(&self, template_type: &str) -> Result<String>
fn get_template(&self, template_type: &str) -> Result<String>
Get a template by type (e.g., “feature”, “fix”, “doc”)
Source§fn get_dockerfile(&self, dockerfile_name: &str) -> Result<Vec<u8>>
fn get_dockerfile(&self, dockerfile_name: &str) -> Result<Vec<u8>>
Get a dockerfile as raw bytes
Source§fn get_dockerfile_file(
&self,
dockerfile_name: &str,
file_path: &str,
) -> Result<Vec<u8>>
fn get_dockerfile_file( &self, dockerfile_name: &str, file_path: &str, ) -> Result<Vec<u8>>
Get a specific file from a dockerfile directory
Source§fn list_templates(&self) -> Vec<String>
fn list_templates(&self) -> Vec<String>
List all available templates
Source§fn list_dockerfiles(&self) -> Vec<String>
fn list_dockerfiles(&self) -> Vec<String>
List all available dockerfiles
Auto Trait Implementations§
impl Freeze for LayeredAssetManager
impl !RefUnwindSafe for LayeredAssetManager
impl Send for LayeredAssetManager
impl Sync for LayeredAssetManager
impl Unpin for LayeredAssetManager
impl !UnwindSafe for LayeredAssetManager
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