pub struct Layout { /* private fields */ }Expand description
Where the tracker lives: a root directory and the project prefix inside it.
Implementations§
Source§impl Layout
impl Layout
pub fn new(root: impl Into<PathBuf>, prefix: impl Into<String>) -> Self
Sourcepub fn resolve(root: Option<&Path>, prefix: Option<&str>) -> Result<Self>
pub fn resolve(root: Option<&Path>, prefix: Option<&str>) -> Result<Self>
Resolve from explicit arguments, falling back to the environment, the
on-disk vissue.toml, and finally the compiled defaults.
pub fn root(&self) -> &Path
pub fn prefix(&self) -> &str
Sourcepub fn projects_dir(&self) -> PathBuf
pub fn projects_dir(&self) -> PathBuf
<root>/<prefix>: the directory scanned for projects.
Sourcepub fn project_issues_path(&self, project: &str) -> PathBuf
pub fn project_issues_path(&self, project: &str) -> PathBuf
<root>/<prefix>/<project>/issues.org.
Trait Implementations§
impl Eq for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.