pub struct TemplateManager {
templates_dir: PathBuf,
}
Fields§
§templates_dir: PathBuf
Implementations§
Source§impl TemplateManager
impl TemplateManager
pub fn new() -> Result<Self>
pub fn list_templates(&self) -> Vec<TemplateType>
pub fn generate_project( &self, name: &str, template_type: TemplateType, output_dir: &Path, ) -> Result<()>
pub fn parse_component_sections( content: &str, format: ComponentFormat, ) -> Result<Vec<ComponentSection>>
fn parse_markdown_format(content: &str) -> Result<Vec<ComponentSection>>
fn parse_modern_format(content: &str) -> Result<Vec<ComponentSection>>
fn parse_legacy_format(content: &str) -> Result<Vec<ComponentSection>>
fn determine_section_name(lang: &str) -> String
Auto Trait Implementations§
impl Freeze for TemplateManager
impl RefUnwindSafe for TemplateManager
impl Send for TemplateManager
impl Sync for TemplateManager
impl Unpin for TemplateManager
impl UnwindSafe for TemplateManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more