Struct sit_core::repository::Repository
[−]
[src]
pub struct Repository { /* fields omitted */ }
Repository is the container for all SIT artifacts
Methods
impl Repository
[src]
fn new<P: Into<PathBuf>>(path: P) -> Result<Self, Error>
[src]
Attempts creating a new repository. Fails with Error::AlreadyExists
if a repository already exists.
fn new_with_config<P: Into<PathBuf>>(
path: P,
config: Config
) -> Result<Self, Error>
[src]
path: P,
config: Config
) -> Result<Self, Error>
Attempts creating a new repository with a specified config. Fails with Error::AlreadyExists
if a repository already exists.
fn open<P: Into<PathBuf>>(path: P) -> Result<Self, Error>
[src]
Opens an existing repository. Fails if there's no valid repository at the given path
fn find_in_or_above<P: Into<PathBuf>, S: AsRef<str>>(
dir: S,
path: P
) -> Result<Self, Error>
[src]
dir: S,
path: P
) -> Result<Self, Error>
fn populate_default_files(&self) -> Result<(), Error>
[src]
Populates repository with default files
fn path(&self) -> &Path
[src]
Returns repository path
fn issues_path(&self) -> &Path
[src]
Returns issues path
fn config(&self) -> &Config
[src]
Returns repository's config
fn issue_iter(&self) -> Result<IssueIter, Error>
[src]
Returns an unordered (as in "order not defined") issue iterator
fn new_issue(&self) -> Result<Issue, Error>
[src]
Creates and returns a new issue with a unique ID
fn new_named_issue<S: Into<String>>(&self, name: S) -> Result<Issue, Error>
[src]
Creates and returns a new issue with a specific name. Will fail if there's an issue with the same name.