pub struct Archetect { /* private fields */ }Implementations§
Source§impl Archetect
impl Archetect
pub fn layout(&self) -> Rc<Box<dyn SystemLayout>>
pub fn offline(&self) -> bool
pub fn headless(&self) -> bool
pub fn builder() -> ArchetectBuilder
pub fn build() -> Result<Archetect, ArchetectError>
pub fn template_engine(&self) -> &Tera
pub fn enable_switch<S: Into<String>>(&mut self, switch: S)
pub fn switches(&self) -> &HashSet<String>
pub fn load_archetype( &self, source: &str, relative_to: Option<Source>, ) -> Result<Archetype, ArchetypeError>
pub fn render_string( &mut self, template: &str, context: &Context, ) -> Result<String, RenderError>
pub fn render_contents<P: AsRef<Path>>( &mut self, path: P, context: &Context, ) -> Result<String, RenderError>
pub fn render_directory<SRC: Into<PathBuf>, DEST: Into<PathBuf>>( &mut self, context: &Context, source: SRC, destination: DEST, rules_context: &mut RulesContext, ) -> Result<(), RenderError>
pub fn write_contents<P: AsRef<Path>>( &self, destination: P, contents: &str, ) -> Result<(), RenderError>
pub fn copy_contents<S: AsRef<Path>, D: AsRef<Path>>( &self, source: S, destination: D, ) -> Result<(), RenderError>
pub fn version(&self) -> Version
Auto Trait Implementations§
impl Freeze for Archetect
impl !RefUnwindSafe for Archetect
impl !Send for Archetect
impl !Sync for Archetect
impl Unpin for Archetect
impl !UnwindSafe for Archetect
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