[][src]Trait guidon::TryNew

pub trait TryNew<A> {
    fn try_new(src: A) -> Result<Self, GuidonError>
    where
        Self: Sized
; }

Try to initialize Guidon from different sources

Required methods

fn try_new(src: A) -> Result<Self, GuidonError> where
    Self: Sized

Try to initialize from an object A

Loading content...

Implementors

impl<'a> TryNew<GitOptions> for Guidon<'a>[src]

fn try_new(git: GitOptions) -> Result<Self, GuidonError>[src]

Initialization from a git repository The repo MUST contains at its root a template.toml file.

impl<'a, P: 'a + AsRef<Path>> TryNew<P> for Guidon<'a>[src]

fn try_new(path: P) -> Result<Self, GuidonError>[src]

Initialization from a folder path or a file path

  • dir_path : the base directory for guidon template. The file template.toml is searched in this directory.
  • file_path : the path of the template file. The working dir will be the file parent directory.
Loading content...